title: initializer list in Clang
body: <p>Today Apple updates Command Line Tools for Xcode and then upgrades clang from 318.0.58 to 318.0.61.</p>
  
  <p>I've tried to use initializer list, but can't compile below code.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;random&gt;
  #include &lt;initializer_list&gt;
  
  int main()
  {
      std::mt19937 rng(time(NULL));
  
      std::initializer_list&lt;double&gt; probabilities =
      {
          0.5, 0.1, 0.1, 0.1, 0.1, 0.1
      };
  
      std::discrete_distribution&lt;&gt; cheat_dice (probabilities);
  
      int a[6] = { };
  
      for ( int i = 0 ; i != 1000; ++i )
      {
          ++a[cheat_dice(rng)];
      }
  
      for ( int i = 0; i != 6; ++i )
      {
          std::cout &lt;&lt; i + 1 &lt;&lt; "=" &lt;&lt; a[i] &lt;&lt; std::endl;
      }
  }
  </code></pre>
  
  <p>Then, I tried to compile.</p>
  
  <pre><code>$ clang++ -stdlib=libc++ foo.cpp
  </code></pre>
  
  <p>Error log</p>
  
  <pre><code>foo.cpp:9:10: error: no member named 'initializer_list' in namespace 'std'
      std::initializer_list&lt;double&gt; probabilities =
      ~~~~~^
  foo.cpp:9:33: error: expected '(' for function-style cast or type construction
      std::initializer_list&lt;double&gt; probabilities =
                            ~~~~~~^
  foo.cpp:9:35: error: use of undeclared identifier 'probabilities'
      std::initializer_list&lt;double&gt; probabilities =
                                    ^
  foo.cpp:10:5: error: expected expression
      {
      ^
  foo.cpp:14:46: error: use of undeclared identifier 'probabilities'
      std::discrete_distribution&lt;&gt; cheat_dice (probabilities);
                                               ^
  5 errors generated.
  </code></pre>
  
  <p>On the other hand, I can compile above code with gcc-4.7.1-RC-20120606.</p>
  
  <pre><code>$ g++ -std=c++11 foo.cpp
  </code></pre>
  
  <p>Doesn't Apple's clang support initializer list?
  Clang version:</p>
  
  <pre><code>$ clang++ -v
  Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
  Target: x86_64-apple-darwin11.4.0
  Thread model: posix
  </code></pre>