title: Obtaining list of keys and values from unordered_map
body: <p>What is the most efficient way of obtaining lists (as a <code>vector</code>) of the keys and values from an <code>unordered_map</code>?</p>
  
  <p>For concreteness, suppose the map in question is a <code>unordered_map&lt;string, double&gt;</code>.
  I'd then like to obtain the keys as a <code>vector&lt;string&gt;</code>, and the values  as a <code>vector&lt;double&gt;</code>.</p>
  
  <pre><code>unordered_map&lt;string, double&gt; um;
  
  vector&lt;string&gt; vs = um.enum_keys();
  vector&lt;double&gt; vd = um.enum_values(); 
  </code></pre>
  
  <p>I can just iterate across the map and collect the result, but is there a more
  efficient method? It would be nice to have a method that also works for regular map,
  since I might switch to that.</p>