This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14020] template keyword used as a disambiguator not conforming to ISO C++ 98
- From: "bernie at develer dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2004 22:54:57 -0000
- Subject: [Bug c++/14020] template keyword used as a disambiguator not conforming to ISO C++ 98
- References: <20040204202720.14020.bernie@develer.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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