title: Why don't unordered associative containers implement the less than operator?
body: <p>The unordered associative containers <code>unordered_set</code>, <code>unordered_map</code> etc do not have a less than operator <code>operator&lt;</code>, neither as a member function nor as a free function. Why? There is no specialization of <code>less</code> either. SGI STL's <code>hash_*</code> types also lack this feature.</p>
  
  <p>If we exclude the concept of underlying types, all container types fulfil the requirements of regular types as defined e.g. in Stepanov &amp; McJones' <em>Elements of Programming</em>. The sole exception are the unordered associative types, which lack <code>operator&lt;</code>.</p>
  
  <hr>
  
  <p>I could not come up with an efficient implementation of such an operator that is consistent with the given definition of equality, so might efficiency be the reason? On the other hand, <code>operator==</code> for unordered associative containers in some cases needs to rehash every element of one container and look it up in the other - O(N) average, but worst case O(N²).</p>