This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14453] Parse error when calling a static member template function with an explict type parameter.
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2004 02:11:51 -0000
- Subject: [Bug c++/14453] Parse error when calling a static member template function with an explict type parameter.
- References: <20040306014121.14453.cakoose@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-03-06 02:11 -------
Subject: Re: New: Parse error when calling a static member template function with an explict type parameter.
"cakoose at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| if "A" is a type parameter. I get a parse error when I try doing:
|
| A::Run <int> ();
This is not compiler bug. Because "A" a is template parameter, the
compiler can not "look" into in it order to determine whether B is a
template or not. You ought to say:
A::template Run<int>();
Note the use of "::template". See our FAQ or consult a recent book on
C++ for more information.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14453