title: std::unordered_map with references as values does not work?
body: <p>This code fails to compile in Visual Studio 2013:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;unordered_map&gt;
  
  class MyClass
  {
  public:
      char a;
  };
  
  int main()
  {
      std::unordered_map&lt;int, MyClass&amp;&gt; MyMap;
      MyClass obj;
      obj.a = 'a';
      MyMap.emplace(1, obj);
      std::cout &lt;&lt; MyMap[1].a;
  }
  </code></pre>
  
  <p>With these error messages:</p>
  
  <pre><code>Error   1   error C2440: 'initializing' : cannot convert from 'int' to 'MyClass &amp;'  c:\program files (x86)\microsoft visual studio 12.0\vc\include\tuple    746
  
  Error   2   error C2439: 'std::pair&lt;const _Kty,_Ty&gt;::second' : member could not be initialized  c:\program files (x86)\microsoft visual studio 12.0\vc\include\tuple    746
  </code></pre>
  
  <p>When I change it to pointers, it compiles fine. Are references invalid as value types in std::unordered_map?</p>
  
  <p>The same code works fine with boost::unordered_map.</p>