prog.cpp: In function ‘int main()’:
prog.cpp:39:18: error: no match for ‘operator==’ (operand types are ‘int’ and ‘T2’)
std::cout << (0 == T2()) << std::endl;
^
prog.cpp:39:18: note: candidates are:
prog.cpp:8:6: note: bool operator==(T1, int)
bool operator == (T1 lhs, int rhs)
^
prog.cpp:8:6: note: no known conversion for argument 1 from ‘int’ to ‘T1’
prog.cpp:13:6: note: bool operator==(int, T1)
bool operator == (int lhs, T1 rhs)
^
prog.cpp:13:6: note: no known conversion for argument 2 from ‘T2’ to ‘T1’