fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Int
  5. {
  6. int _i;
  7. Int(int i=0) :_i{i} {}
  8. friend Int operator+(const Int& lhs, const Int& rhs);
  9. };
  10.  
  11. Int operator+(const Int& lhs, const Int& rhs)
  12. {
  13. return lhs._i+rhs._i;
  14. }
  15.  
  16. int main()
  17. {
  18. Int i;
  19. i + 5;
  20. 5 + i;
  21. return 0;
  22. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty