ac-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] AC_CXX_TEMPLATE_KEYWORD_QUALIFIER VS. GCC 3.4


From: Bernardo Innocenti
Subject: [PATCH] AC_CXX_TEMPLATE_KEYWORD_QUALIFIER VS. GCC 3.4
Date: Thu, 05 Feb 2004 00:21:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Peter Simons wrote:
Bernardo Innocenti writes:

 > Shall I submit a patch?

Yes, please do. :-)

Here you are.  Sorry if I missed some rule for contributing
to ac-archive.

Tested with gcc 3.3.2, 3.4 and tree-ssa branch, all of which
pass the test.  I have no access to a compiler which should
fail :-/

In case it matters, I already have copyright assignment papers
on file with the FSF for some auto* projects.


--- aclocal/C++_Support/ac_cxx_template_keyword_qualifier.m4.old        
2004-02-04 23:55:20.404459029 +0100
+++ aclocal/C++_Support/ac_cxx_template_keyword_qualifier.m4    2004-02-04 
23:59:29.237949202 +0100
@@ -12,9 +12,18 @@ ac_cv_cxx_template_keyword_qualifier,
[AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_TRY_COMPILE([
-class A { public : A() {}; template<class T> static T convert() { return T(); }
-};
-],[double z = A::template convert<double>(); return 0;],
+  class X
+  {
+    public:
+    template<int> void member() {}
+    template<int> static void static_member() {}
+  };
+  template<class T> void f(T* p)
+  {
+    p->template member<200>(); // OK: < starts template argument
+    T::template static_member<100>(); // OK: < starts explicit qualification
+  }
+],[X x; f(&x); return 0;],
 ac_cv_cxx_template_keyword_qualifier=yes, 
ac_cv_cxx_template_keyword_qualifier=no)
 AC_LANG_RESTORE
])


--
 // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]