title: How do I initialize a member array with an initializer_list?
body: <p>I'm getting up to speed with C++0x, and testing things out with g++ 4.6</p>
  
  <p>I just tried the following code, thinking it would work, but it doesn't compile. I get the error:</p>
  
  <p><code>incompatible types in assignment of ‘std::initializer_list&lt;const int&gt;’ to ‘const int [2]’</code></p>
  
  <pre><code>struct Foo
    {
      int const data[2];
  
      Foo(std::initializer_list&lt;int const&gt;&amp; ini)
      : data(ini)
      {}
    };
  
  Foo f = {1,3};
  </code></pre>