fork(1) download
  1. struct MyClass {
  2. void operator-() const {}
  3. };
  4.  
  5. //void operator-(const MyClass&) {}
  6.  
  7. struct Wrapper {
  8. operator MyClass() const { return MyClass(); }
  9. };
  10.  
  11. int main() {
  12. -Wrapper();
  13. }
Compilation error #stdin compilation error #stdout 0s 3292KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:2: error: no match for ‘operator-’ (operand type is ‘Wrapper’)
  -Wrapper();
  ^
stdout
Standard output is empty