fork(3) download
  1. #include <iostream>
  2.  
  3. class Foo
  4. {
  5. public:
  6. int operator+(const Foo& b)
  7. {
  8. return 5;
  9. }
  10. };
  11.  
  12. int operator+(const Foo& a, const Foo& b)
  13. {
  14. return 6;
  15. }
  16.  
  17. int main()
  18. {
  19. Foo a, b;
  20. int c{ a + b };
  21. std::wcout << c << std::endl;
  22. return 0;
  23. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
5