title: no matching constructor for initialization of 'vector<string>' with clang++ 3.2
body: <p>I'm learning c++ with C++ Primer, 5th ed..</p>
  
  <p>I'm trying to compile a simple c++ program with C++11 features with clang++ but I'm getting compile errors for what should be valid code.</p>
  
  <p>This is an example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main(){
    int n = 0;
    auto *p = &amp;n; //&lt;-- this compiles  
  
    cout &lt;&lt; *p &lt;&lt; endl;
  
    vector&lt;string&gt; articles = {"a", "an", "the"}; //&lt;-- this fails; copied from the book
  
    return 0;
  }
  </code></pre>
  
  <p>And this is the complete error:</p>
  
  <pre><code>$ clang++ -std=c++11 -v test.cpp -o test
  clang version 3.2 (tags/RELEASE_32/final)
  Target: x86_64-apple-darwin10.8.0
  Thread model: posix
   "/usr/local/Cellar/llvm/3.2/bin/clang" -cc1 -triple x86_64-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 127.2 -v -resource-dir /usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2 -fmodule-cache-path /var/folders/pk/pkIeYbRaF-yeeUH3Q6Q5AE+++TI/-Tmp-/clang-module-cache -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/Oton/Desktop -ferror-limit 19 -fmessage-length 150 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.6.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/pk/pkIeYbRaF-yeeUH3Q6Q5AE+++TI/-Tmp-/test-w65CaF.o -x c++ test.cpp
  clang -cc1 version 3.2 based upon LLVM 3.2svn default target x86_64-apple-darwin10.8.0
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   /usr/include/c++/4.2.1
   /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
   /usr/include/c++/4.2.1/backward
   /usr/include/c++/4.0.0
   /usr/include/c++/4.0.0/i686-apple-darwin8
   /usr/include/c++/4.0.0/backward
   /usr/local/include
   /usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2/include
   /usr/include
   /System/Library/Frameworks (framework directory)
   /Library/Frameworks (framework directory)
  End of search list.
  test.cpp:13:18: error: no matching constructor for initialization of 'vector&lt;string&gt;'
    vector&lt;string&gt; articles = {"a", "an", "the"};
                   ^          ~~~~~~~~~~~~~~~~~~
  /usr/include/c++/4.2.1/bits/stl_vector.h:255:9: note: candidate constructor [with _InputIterator = const char *] not viable: no known conversion from
        'const char [4]' to 'const allocator_type' (aka 'const std::allocator&lt;std::basic_string&lt;char&gt; &gt;') for 3rd argument
          vector(_InputIterator __first, _InputIterator __last,
          ^
  /usr/include/c++/4.2.1/bits/stl_vector.h:213:7: note: candidate constructor not viable: no known conversion from 'const char [2]' to 'size_type'
        (aka 'unsigned long') for 1st argument
        vector(size_type __n, const value_type&amp; __value = value_type(),
        ^
  /usr/include/c++/4.2.1/bits/stl_vector.h:201:7: note: candidate constructor not viable: allows at most single argument '__a', but 3 arguments were
        provided
        vector(const allocator_type&amp; __a = allocator_type())
        ^
  /usr/include/c++/4.2.1/bits/stl_vector.h:231:7: note: candidate constructor not viable: requires single argument '__x', but 3 arguments were provided
        vector(const vector&amp; __x)
        ^
  1 error generated.
  </code></pre>
  
  <p>I'm on a mac, 10.6.8, I built llvm/clang with homebrew with options: </p>
  
  <pre><code>brew install llvm -v --all-targets --rtti --shared --with-asan --with-clang --use-clang
  </code></pre>
  
  <p>What am I doing wrong?</p>