[ create a new paste ] login | about

Link: http://codepad.org/PHSLepx8    [ raw code | fork ]

C++, pasted on Sep 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <set>

struct T {
   friend bool operator<(const T& lhs, const T& rhs) {
      return false; // note: NOT a valid ordering!
   }
};

int main() {
   std::set<T> s;
   s.insert(T());
   s.insert(T());
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: