[config][gcc 3.4.2] Request for test about function template ordering

Hi, I've got the hunch that GCC 3.4.2 (specifically, the mingw version) might have some problems with function template ordering. Could somebody with access to that compiler please run the code below and report the results? Many thanks in advance. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo #include <iostream> namespace A { template<typename T,typename Q> void foo(T&,Q&) { std::cout<<"default"<<std::endl; } } struct bar{}; namespace A { template<typename T> void foo(T&,bar&) { std::cout<<"bar-specific"<<std::endl; } } namespace B { inline void f() { int x; bar b; A::foo(x,b); } } int main() { B::f(); return 0; }

JOAQUIN LOPEZ MU?Z wrote:
Hi, I've got the hunch that GCC 3.4.2 (specifically, the mingw version) might have some problems with function template ordering. Could somebody with access to that compiler please run the code below and report the results? Many thanks in advance.
"bar-specific" for gcc 3.4.0, gcc 3.4.2, gcc 3.4.3, gcc 3.3.5, gcc 3.2.3, gcc 3.1 on Linux. HTH, m

JOAQUIN LOPEZ MU?Z wrote:
Hi, I've got the hunch that GCC 3.4.2 (specifically, the mingw version) might have some problems with function template ordering. Could somebody with access to that compiler please run the code below and report the results? Many thanks in advance.
C:\DATA\USERS\bronislaw\My Documents\MSYS>g++ -v Reading specs from C:/MinGW342/bin/../lib/gcc/mingw32/3.4.2/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.2 (mingw-special) C:\DATA\USERS\bronislaw\My Documents\MSYS>g++ -Wall --ansi --pedantic T566.cpp -oT566 C:\DATA\USERS\bronislaw\My Documents\MSYS>T566 bar-specific C:\DATA\USERS\bronislaw\My Documents\MSYS> Best regards B.
participants (3)
-
Bronek Kozicki
-
JOAQUIN LOPEZ MU?Z
-
Martin Wille