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++/14453] Parse error when calling a static member template function with an explict type parameter.


------- 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


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