title: Compiler error reported for const vector<const T> in VS 2015 but not VS 2013
body: <p>The following code compiles OK using Visual Studio 2013.</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;string&gt;
  
  int main()
  {
      const std::string constString("fred");
      const std::vector&lt;const std::string&gt; myVector{ constString };
  }
  </code></pre>
  
  <p>If I try to compile it using Visual Studio 2015 the following error is reported:</p>
  
  <p><code>1&gt;xmemory0(587): error C2338: The C++ Standard forbids containers of const elements because allocator&lt;const T&gt; is ill-formed.</code></p>
  
  <p>I've seen various posts, and in particular this one <a href="https://stackoverflow.com/q/6954906/820657">Does C++11 allow vector&lt;const T&gt;?</a>, about <code>vector&lt;const T&gt;</code> and why it's not allowed but I don't really get it. However, in the above example the vector itself is const.</p>
  
  <p>Can someone please explain? Is VS 2013 wrong to compile it successfully?</p>