template<typename T> struct A { operator T() { return 0; } operator int() { return 1; } void f() { operator T(); } }; int main() { A<int> a; a.f(); }
Standard input is empty
prog.cpp: In instantiation of 'A<int>': prog.cpp:12:10: instantiated from here prog.cpp:4:3: error: 'A<T>::operator int() [with T = int]' cannot be overloaded prog.cpp:3:3: error: with 'A<T>::operator T() [with T = int]'
Standard output is empty