>Submitter-Id: net >Originator: Alexander Bürger >Organization: >Confidential: no >Synopsis: g++ fails to call member template from template class >Severity: critical >Priority: low >Category: c++ >Class: rejects-legal >Release: 3.2.2 20030131 (Debian prerelease) (Debian testing/unstable) >Environment: System: Linux feynman 2.4.20 #3 Sam Jan 4 17:10:36 CET 2003 i686 unknown unknown GNU/Linux Architecture: i686
host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --disable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux >Description: g++ fails to compile the code; complains about syntax error >How-To-Repeat: compile the example code: ------------------------ struct maxi { template<class T> void do_it() { } }; template<class T> struct mini { void do_something( maxi& m ) { m.do_it<T>(); } /* ERROR: syntax error before `;' token */ }; int main() { maxi ma; mini<int> mi; mi.do_something( ma ); return 0; } ------------------------ >Fix: no generally applicable work-around or fix known