title: According to the spec, is const required with auto for const references?
body: <p><strong>EDIT</strong> I missed an important detail, the map is <code>const</code>. The example has been updated.</p>
  
  <p>Consider</p>
  
  <pre><code>const std::map&lt;int, int&gt; ints;
  auto&amp; it = ints.find(0);
  </code></pre>
  
  <p>Reviewing both the C++ (working draft) specification, as well as Stroustrup's "The C++ Programming Language, FOURTH EDITION", I cannot determine if <code>const</code> is required (I do believe decorating the type explicitly with <code>const</code> is better stylistically, but such is not my question). Visual Studio 2013 compiles it fine, deducing <code>const</code>.</p>
  
  <p>I understand that a naked <code>auto</code> (i.e. no decorations such as <code>const</code> nor <code>&amp;</code>) will deduce a non-const, non-reference type.</p>
  
  <p>In every example in Stroupstrup's book, he uses <code>const auto&amp;</code> and never <code>auto&amp;</code> for such scenarios. <strong>edit</strong> But he doesn't speak to the option/need of using <code>const</code>, they are just examples of <code>auto</code>.</p>
  
  <p>gcc 4.9.1 fails to compile it, as does xcode for mac:
  <code>error: invalid initialization of non-const reference of type ...</code></p>
  
  <p>Are these compiler choices? Does the specification speak either way about this?</p>
  
  <p>Thanks.</p>