fork download
  1. class Type {
  2. };
  3.  
  4. bool operator or(Type lhs, Type rhs) {
  5. return true;
  6. }
  7.  
  8. bool operator ||(Type lhs, Type rhs) {
  9. return false;
  10. }
  11.  
  12. int main() {
  13. Type a;
  14. Type b;
  15. a or b;
  16. a || b;
  17. }
Compilation error #stdin compilation error #stdout 0s 2848KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty