title: C++11 g++ with brace-enclosed initializer lists
body: <p>I'm new to programming so I apologize if this is an obvious question, however I am having trouble with the syntax presented to me in a book (Programming Principles and Practice using C++ 2nd Edition by the creator of C++, Bjarne Stroustrup).  In it, the following is presented for creating a vector of strings:</p>
  
  <pre><code>vector&lt;string&gt; philosopher
      ={"Kant","Plato","Hume","Kierkegaard"};
  </code></pre>
  
  <p>However, when passing this through g++ it doesn't like it.  My code is as follows:</p>
  
  <pre><code>#include "std_lib_facilities.h"  //The author's library for his examples
  
  int main()
  {
    vector&lt;string&gt;philosopher
      ={"Kant","Plato","Hume","Kierkegaard"};
  
  }
  </code></pre>
  
  <p>I'm getting an error compiling:</p>
  
  <pre><code>g++ vecttest.cpp -std=c++11
  In file included from /usr/local/include/c++/4.9.0/ext/hash_map:60:0,
               from /usr/include/std_lib_facilities.h:34,
               from vecttest.cpp:1:
  /usr/local/include/c++/4.9.0/backward/backward_warning.h:32:2: warning: #warning 
  This file includes at least one deprecated or antiquated header which may 
  be removed without further notice at a future date. Please use a 
  non-deprecated interface with equivalent functionality instead. For a listing     
  of replacement headers and interfaces, consult the file backward_warning.h. 
  To disable this warning use -Wno-deprecated. [-Wcpp]
  #warning \
  ^
  In file included from /usr/local/include/c++/4.9.0/locale:41:0,
               from /usr/local/include/c++/4.9.0/iomanip:43,
               from /usr/include/std_lib_facilities.h:212,
               from vecttest.cpp:1:
  /usr/local/include/c++/4.9.0/bits/locale_facets_nonio.h:1869:5: error: 
  template-id  ‘do_get&lt;&gt;’ for 
  ‘String std::messages&lt;char&gt;::do_get(std::messages_base::catalog, int, int, 
  const String&amp;) const’ does not match any template declaration
   messages&lt;char&gt;::do_get(catalog, int, int, const string&amp;) const;
   ^
  /usr/local/include/c++/4.9.0/bits/locale_facets_nonio.h:1869:62: note: 
  saw 1 ‘template&lt;&gt;’, need 2 for specializing a member function template
   messages&lt;char&gt;::do_get(catalog, int, int, const string&amp;) const;
                                                            ^
  vecttest.cpp: In function ‘int main()’:
  vecttest.cpp:8:42: error: could not convert ‘{"Kant", "Plato", 
  "Hume","Kierkegaard"}’from ‘&lt;brace-enclosed initializer list&gt;’ to ‘Vector&lt;String&gt;’
   ={"Kant","Plato","Hume","Kierkegaard"};
  </code></pre>
  
  <p>I thought maybe my version of GCC was older (Which it was at 4.7) so I updated it to 4.9:</p>
  
  <pre><code>g++ -v
  Using built-in specs.
  COLLECT_GCC=g++
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
  Target: x86_64-unknown-linux-gnu
  Configured with: ../gcc-4.9.0/configure
  Thread model: posix
  gcc version 4.9.0 (GCC) 
  </code></pre>
  
  <p>Any ideas where I'm going wrong?</p>
  
  <p>Thank you very much for your help.</p>