struct A {
int a;
bool operator> ( const int & inty) { return a > inty; }
} ;
template < class A, class B> auto operator< ( const A& a, const B& b) - > decltype( operator> ( a,b) ) { return a < b; }
int main( void ) {
A a; a.a = 1 ; int b = 2 ;
operator< ( a,b) ;
return 0 ;
}
c3RydWN0IEEgewogIGludCBhOwogIGJvb2wgb3BlcmF0b3I+KGNvbnN0IGludCYgaW50eSkgeyByZXR1cm4gYSA+IGludHk7IH0KfTsKCnRlbXBsYXRlIDxjbGFzcyBBLCBjbGFzcyBCPiBhdXRvIG9wZXJhdG9yPChjb25zdCBBJiBhLCBjb25zdCBCJiBiKSAtPiBkZWNsdHlwZShvcGVyYXRvcj4oYSxiKSkgeyByZXR1cm4gYSA8IGI7IH0KCmludCBtYWluKHZvaWQpIHsKCUEgYTsgYS5hID0gMTsgaW50IGIgPSAyOwoJb3BlcmF0b3I8KGEsYik7CglyZXR1cm4gMDsKfQ==
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10:15: error: 'operator>' not defined
prog.cpp:10:15: error: 'operator>' not defined
prog.cpp:10:15: error: no matching function for call to 'operator<(A&, int&)'
stdout