This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14020] template keyword used as a disambiguator not conforming to ISO C++ 98


------- Additional Comments From bernie at develer dot com  2004-02-04 22:54 -------
Sorry, I thought I had aborted this bug filing, but eventually
Mozilla submitted the form when I opened another URL in the
same window ;-)

The problem has been cleared with the ac-archive people and
I'm going to submit an updated configure test.

This was the failing testcase from
ac_cxx_template_keyword_qualifier.m4:

 class A {
 public:
       A() {};
       template<class T> static T convert() { return T(); }
 };

 int main ()
 {
         double z = A::template convert<double>();
         return 0;
 }

And this is what the updated configure test
should look like:

 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 list
        T::template static_member<100>(); // OK: < starts explicit qualification
 }
 int main()
 {
	X x;
	f(&x);
        return 0;
 }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14020


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]