fork(15) download
  1. #include <iostream>
  2.  
  3. struct A
  4. {
  5. bool operator==(const A& rhs) const { return this == &rhs ; }
  6.  
  7. int a ;
  8. };
  9.  
  10. int main() {
  11. A a {2}, b{2};
  12. std::cout << std::boolalpha << (a == b);
  13. return 0;
  14. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
false