class Type {}; bool operator or(Type lhs, Type rhs) { return true;} bool operator ||(Type lhs, Type rhs) { return false;} int main() { Type a; Type b; a or b; a || b;}
Standard input is empty
prog.cpp: In function ‘bool operator||(Type, Type)’: prog.cpp:8:6: error: redefinition of ‘bool operator||(Type, Type)’ prog.cpp:4:6: error: ‘bool operator||(Type, Type)’ previously defined here
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!