title: unordered_map of unique_ptr: can't get value from iterator
body: <p>I am trying to get a unique_ptr stored in an unordered_map. I use the following code:</p>
  
  <pre><code>#include &lt;unordered_map&gt;
  #include &lt;memory&gt;
  
  int *function()
  {
      std::unordered_map&lt; int, std::unique_ptr&lt;int&gt; &gt; hash;
  
      auto iterator=hash.find(5);
      return iterator-&gt;second().get();
  }
  </code></pre>
  
  <p>When I try to compile this (gcc 4.7.2) I get the following error:</p>
  
  <pre><code>test.cpp: In function ‘int* function()’:
  test.cpp:9:29: error: no match for call to ‘(std::unique_ptr&lt;int&gt;) ()’
  </code></pre>
  
  <p>I do not understand what is wrong with this code. It's as if I needed to use another method to extract a reference from the iterator, but I know of no way to do it.</p>
  
  <p>Shachar</p>