language: C++ 4.7.2 (gcc-4.7.2)
date: 694 days 2 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
template <class T>
struct impl
{
   void f(T &)
   {
   }
   void f(T *)
   {
   }
};
 
template <class T>
void g(T & v)
{
    impl<T>::f(v);
}
 
int main()
{
    g(main);
}
 
prog.cpp: In function ‘void g(T&) [with T = int ()()]’:
prog.cpp:20:   instantiated from here
prog.cpp:15: error: call of overloaded ‘f(int (&)())’ is ambiguous
prog.cpp:4: note: candidates are: void impl<T>::f(T&) [with T = int ()()]
prog.cpp:7: note:                 void impl<T>::f(T*) [with T = int ()()]