title: C++11 segfault on reference to unordered_map in vector
body: <p>When i run the following code I get a segfault on the 'find()' call.</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;unordered_map&gt;
  
  struct item {
      std::unordered_map&lt;int,int&gt; map;
  };
  
  int main(int argc, char** argv) {
     std::vector&lt;item&gt; stack;
     stack.emplace_back();
     std::unordered_map&lt;int,int&gt;&amp; topmap=stack.back().map;
     stack.emplace_back();
     auto ind=topmap.find(5);
     if(ind!=topmap.end()) {
        printf("Found element five in second to top item\n");
     }
  }
  </code></pre>
  
  <p>(compiled with -std=c++11)</p>
  
  <p>However, if the second emplace_back() call is removed, there is no segfault.</p>
  
  <p>Why is this? Am I using reference variables wrong?  Does adding another element to the stack invalidate topmap?</p>