prog.cpp: In function ‘int main()’:
prog.cpp:33:4: error: no match for ‘operator==’ (operand types are ‘A’ and ‘X<int>’)
a == x;
^
prog.cpp:33:4: note: candidate is:
prog.cpp:9:6: note: template<class T> bool operator==(X<T>, X<T>)
bool operator==( X<T>, X<T> ) { return true; }
^
prog.cpp:9:6: note: template argument deduction/substitution failed:
prog.cpp:33:7: note: ‘A’ is not derived from ‘X<T>’
a == x;
^