~ubuntu-branches/ubuntu/hardy/autoconf-archive/hardy

« back to all changes in this revision

Viewing changes to m4source/ac_cxx_template_scoped_argument_matching.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-06-26 09:43:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040626094357-3be3jwcz1vcdhpe8
Tags: upstream-20040616
ImportĀ upstreamĀ versionĀ 20040616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Available from the GNU Autoconf Macro Archive at:
 
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_template_scoped_argument_matching.html
 
3
dnl
 
4
AC_DEFUN([AC_CXX_TEMPLATE_SCOPED_ARGUMENT_MATCHING],
 
5
[AC_CACHE_CHECK(whether the compiler supports function matching with argument types which are template scope-qualified,
 
6
ac_cv_cxx_template_scoped_argument_matching,
 
7
[AC_REQUIRE([AC_CXX_TYPENAME])
 
8
 AC_LANG_SAVE
 
9
 AC_LANG_CPLUSPLUS
 
10
 AC_TRY_COMPILE([
 
11
#ifndef HAVE_TYPENAME
 
12
 #define typename
 
13
#endif
 
14
template<class X> class A { public : typedef X W; };
 
15
template<class Y> class B {};
 
16
template<class Y> void operator+(B<Y> d1, typename Y::W d2) {}
 
17
],[B<A<float> > z; z + 0.5f; return 0;],
 
18
 ac_cv_cxx_template_scoped_argument_matching=yes, ac_cv_cxx_template_scoped_argument_matching=no)
 
19
 AC_LANG_RESTORE
 
20
])
 
21
if test "$ac_cv_cxx_template_scoped_argument_matching" = yes; then
 
22
  AC_DEFINE(HAVE_TEMPLATE_SCOPED_ARGUMENT_MATCHING,,
 
23
            [define if the compiler supports function matching with argument types which are template scope-qualified])
 
24
fi
 
25
])