fork download
  1. #include <iostream>
  2.  
  3. class IsIntLess {
  4. public:
  5. bool operator()(int x,int y)
  6. {return x<y;}
  7. };
  8.  
  9. IsIntLess isLess;
  10.  
  11. class Kok
  12. {
  13. public:
  14. operator int(){return 0;}
  15. };
  16.  
  17. class Kokok
  18. {
  19. int ok;
  20. public:
  21. Kokok(int ok):ok(ok){}
  22. operator int(){return ok;}
  23. };
  24.  
  25.  
  26. int main() {
  27. Kok a;
  28. Kokok b(6);
  29. std::cout << isLess(a, b) << std::endl;
  30. return 0;
  31. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
1