language: C++11 (gcc-4.7.2)
date: 537 days 13 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
 
namespace A { int f(int); template<class T> int g(T x) { return f(x); } }
 
namespace B { struct C {}; }
 
namespace A { int f(B::C x) { return 1; } }
 
int h() { return A::g(B::C()); }
 
int main()
{
   std::cout << h();
}
prog.cpp: In function 'int A::g(T) [with T = B::C]':
prog.cpp:9:29:   instantiated from here
prog.cpp:3:68: error: cannot convert 'B::C' to 'int' for argument '1' to 'int A::f(int)'