title: Is there any advantage of using map over unordered_map in case of trivial keys?
body: <p>A recent talk about <code>unordered_map</code> in C++ made me realize that I should use <code>unordered_map</code> for most cases where I used <code>map</code> before, because of the efficiency of lookup ( <em>amortized O(1)</em> vs. <em>O(log n)</em> ). Most times I use a map, I use either <code>int</code> or <code>std::string</code> as the key type; hence, I've got no problems with the definition of the hash function. The more I thought about it, the more I came to realize that I can't find any reason of using a <code>std::map</code> over a <code>std::unordered_map</code> in the case of keys with simple types -- I took a look at the interfaces, and didn't find any significant differences that would impact my code. </p>
  
  <p>Hence the question: is there any real reason to use <code>std::map</code> over <code>std::unordered_map</code> in the case of simple types like <code>int</code> and <code>std::string</code>?</p>
  
  <p>I'm asking from a strictly programming point of view -- I know that it's not fully considered standard, and that it may pose problems with porting.</p>
  
  <p>Also, I expect that one of the correct answers might be <em>"it's more efficient for smaller sets of data"</em> because of a smaller overhead (is that true?) -- hence I'd like to restrict the question to cases where the amount of keys is non-trivial (>1 024).</p>
  
  <p><strong>Edit:</strong> <em>duh, I forgot the obvious (thanks GMan!) -- yes, maps are ordered of course -- I know that, and am looking for other reasons.</em></p>