title: STL map containing references does not compile
body: <p>The following:</p>
  
  <pre><code>std::map&lt;int, ClassA &amp;&gt; test;
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>error C2101: '&amp;' on constant
  </code></pre>
  
  <p>While the following</p>
  
  <pre><code>std::map&lt;ClassA &amp;, int&gt; test;
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>error C2528: '_First' : pointer to reference is illegal
  </code></pre>
  
  <p>The latter seems like map cannot contain a reference for the key value, since it needs to instantiate the class sometimes and a reference cannot be instantiated without an object. But why does the first case not work?</p>