fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define First Objct t; t
  5. #define Second +0,a() / b()
  6. #define Third ;
  7.  
  8. struct Objct {
  9. int operator[](int n) { cout << "operator[] called with "<<n<<endl; return n; }
  10. Objct operator+ (int n0) { return *this; }
  11. };
  12. int a() { return 10;}
  13. int b() { return 2;}
  14.  
  15. int main() {
  16. {
  17. First [ Second ] Third
  18. }
  19. {
  20. First Second Third
  21. }
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
operator[] called with 5