------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-10 23:01 ------- This is not a bug: template<class TC, int V> int Cx<TC, V>::fx(TC* tc) { return tc->f<V>(); }
You frogot the template keyword. That is the above should be: template<class TC, int V> int Cx<TC, V>::fx(TC* tc) { return tc->template f<V>(); } as tc is dependent, you need to tell the compiler that it will be a template, otherwise it will try to parse the < as a < that it is parsing it as (tc->f < V) > () . Also EDG in strict mode (non GNU extension mode) rejects it as expected. See also http://gcc.gnu.org/gcc-3.4/changes.html (You must now use the typename and template keywords to disambiguate dependent names, as required by the C++ standard. ) . -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36203