fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct bar {
  5. const char *operator!() {return "kaboom";}
  6. };
  7.  
  8. struct foo {
  9. bar operator!() {return bar();}
  10. };
  11.  
  12. int main() {
  13. std::cout << !!foo() << std::endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
kaboom