This example compiles succesfully with gcc-3.4.3 if the definition of the function 'foo(B)' is moved before the definition of 'bar()'.
#include <iostream>
struct A {} ; struct B {} ;
template <class T> void foo(A) { std::cout << "foo(A)" << std::endl ; }
template <class T> void bar() { foo< T >(B()) ; }
template <class T> void foo(B) { std::cout << "foo(B)" << std::endl ; }
int main() { bar< int >() ; return 0 ; }
Thanks, toon