title: How to nicely unpack unordered_map element in range-based for loop?
body: <p>Consider this code:</p>
  
  <pre><code>#include &lt;tuple&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;unordered_map&gt;    
  int main()
  {
      std::unordered_map&lt;int,std::string&gt; map {{5,"five"},{1,"one"},{-7,"minus seven"}};
      int x;
      std::string s;
      for(std::tie(x,s) : map)
          std::cout &lt;&lt; x &lt;&lt; "-&gt;" &lt;&lt; s &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>Here on the line with <code>for</code> I get the an error from clang++-3.6:</p>
  
  <blockquote>
    <p>test.cpp:14:23: error: for range declaration must declare a variable</p>
  </blockquote>
  
  <p>This seems to mean I'm out of luck with <code>std::tie</code> to unpack the <code>pair</code> which <code>val</code> would be if I did <code>for(auto val: map)</code>.</p>
  
  <p>But I'd really like to automatically unpack the pair without any extra line in the loop body. Is there still any elegant way to achieve this?</p>