[EMAIL PROTECTED] wrote:
The following gives an error at line 20. However, if I change all "doit1" to "doit". I will only get warnings. Is there any thing wrong with gcc?g++-3.3 -g -Wall -W -I/usr/local/include/clapack/ -c -o main.o main.cc main.cc: In member function `void C::doit1(typename A<T>::iterator*)': main.cc:20: error: parse error before `;' token main.cc: In function `int main(int, char**)': main.cc:25: warning: unused parameter `int argc' main.cc:25: warning: unused parameter `char**argv' make: *** [main.o] Error 1 ///////////////////// template <typename T> class A { public: class iterator{ }; }; class B { public: template <typename T> void doit(typename A<T>::iterator *it){ } }; class C { public: template <typename T> void doit1(typename A<T>::iterator *it){ B b; b.doit<T>(it);//line 20 } }; int main(int argc, char *argv[]) { A<int>::iterator it1; C c; c.doit1<int>(&it1); }
Comeau online seems to like it. Cross posting to gnu.g++.help _______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
