fork download
  1. #include <iostream>
  2. #include <set>
  3.  
  4.  
  5. struct blah{
  6. int a,b,c;
  7. bool operator < ( const blah& blo ) const{
  8. return ( a < blo.a || (a == blo.a && (b != blo.b || c != blo.c ) ) );
  9. }
  10. };
  11.  
  12. std::set<blah> set;
  13.  
  14. int main() {
  15.  
  16. set.insert(blah());
  17. set.insert(blah());
  18. set.insert(blah());
  19. return 0;
  20. }
Success #stdin #stdout 0s 2980KB
stdin
Standard input is empty
stdout
Standard output is empty