It seems very strange to me, but in the following code, gcc complains that it doesn't find 'propagate' with a correct signature though it exist in the base class as a template method. If I change the name 'propagate' into 'prop', then it compiles happily.
Sebastien. template< typename T, typename X > class propJoin : public joinOp<T> { public: template< typename Iter > void propagate( const T& n, Iter first, Iter last ) { std::cout << "propJoin<T,X>::propagate( const T& node, Iter first, Iter last )" << std::endl; } }; class node { }; class info { }; class dfgBackProp : public propJoin<node,info> { public: void propagate( const node& n ) { std::vector<info> infos; propagate(n,infos.begin(),infos.end()); } }; sebastien-mirolos-powerbook-g4-12:~/build/rep smirolo$ g++ -v testTemplate.cc --save-temps Using built-in specs. Target: powerpc-apple-darwin8.4.0 Configured with: /Volumes/Home/Users/smirolo/reference/gcc-4.0.2/configure --prefix=/Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2 --enable-languages=c,c++ Thread model: posix gcc version 4.0.2 /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/libexec/gcc/powerpc-apple-darwin8.4.0/4.0.2/cc1plus -E -quiet -v -D__DYNAMIC__ -D__APPLE_CC__=1 testTemplate.cc -fPIC -fpch-preprocess -o testTemplate.ii ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/lib/gcc/powerpc-apple-darwin8.4.0/4.0.2/../../../../powerpc-apple-darwin8.4.0/include" #include "..." search starts here: #include <...> search starts here: /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/lib/gcc/powerpc-apple-darwin8.4.0/4.0.2/../../../../include/c++/4.0.2 /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/lib/gcc/powerpc-apple-darwin8.4.0/4.0.2/../../../../include/c++/4.0.2/powerpc-apple-darwin8.4.0 /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/lib/gcc/powerpc-apple-darwin8.4.0/4.0.2/../../../../include/c++/4.0.2/backward /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/include /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/lib/gcc/powerpc-apple-darwin8.4.0/4.0.2/include /usr/include /System/Library/Frameworks /Library/Frameworks End of search list. /Volumes/Home/Users/smirolo/installed/local/gcc-4.0.2/libexec/gcc/powerpc-apple-darwin8.4.0/4.0.2/cc1plus -fpreprocessed testTemplate.ii -fPIC -quiet -dumpbase testTemplate.cc -auxbase testTemplate -version -o testTemplate.s GNU C++ version 4.0.2 (powerpc-apple-darwin8.4.0) compiled by GNU C version 4.0.1 (Apple Computer, Inc. build 5250). GGC heuristics: --param ggc-min-expand=65 --param ggc-min-heapsize=65536 testTemplate.cc: In member function 'void dfgBackProp::propagate(const node&)': testTemplate.cc:28: error: no matching function for call to 'dfgBackProp::propagate(const node&, __gnu_cxx::__normal_iterator<info*, std::vector<info, std::allocator<info> > >, __gnu_cxx::__normal_iterator<info*, std::vector<info, std::allocator<info> > >)' testTemplate.cc:26: note: candidates are: void dfgBackProp::propagate(const node&) sebastien-mirolos-powerbook-g4-12:~/build/rep smirolo$ -- Summary: Cannot find base class template method Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: smirolo at hotmail dot com GCC host triplet: powerpc-apple-darwin8.4.0 GCC target triplet: powerpc-apple-darwin8.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26310