|
Boost : |
From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2004-12-18 15:28:58
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;
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk