Author
anonymous
over 8 years ago
Language
Compiler
Options
Author
anonymous
over 8 years ago
$ prog.cc: In function 'int main()':
prog.cc:22:20: error: call of overloaded 'f(A<int, void>)' is ambiguous
f(A<int, void>());
^
prog.cc:11:33: note: candidate: 'void f(A<T, U>) [with T = int; U = void]'
template<class T, class U> void f(A<T, U>) { std::cout << "0\n"; } // #0
^
prog.cc:12:24: note: candidate: 'void f(A<T, typename voider<T>::type>) [with T = int; typename voider<T>::type = void]'
template<class T> void f(A<T, void_t<T>>) { std::cout << "1\n"; } // #1
^
Exit Code:
1