title: unordered_map with reference as value
body: <p>Is it legal to have an unordered_map with the value type being a reference C++11?</p>
  
  <p>For example <code>std::unordered_map&lt;std::string, MyClass&amp;&gt;</code></p>
  
  <p>I have managed to get this to compile with VS2013 however I'm not sure whether it's supposed to as it is causing some strange runtime errors. For example <code>vector subscript out of range</code> is thrown when trying to <code>erase</code> an element.</p>
  
  <p>Some googling resulted in finding out that you can't have a vector of references but I can't find anything about an unordered_map.</p>
  
  <h1>Update</h1>
  
  <p>Further experimentation has shown that the <code>vector subscript out of range</code> was not related to the unordered_map of references as it was a bug in my code.</p>