C++ Copy constructor gets called instead of initializer_list<> : <p>Based on this code</p>

<pre><code>struct Foo 
{
   Foo() 
   {
       cout &lt;&lt; "default ctor" &lt;&lt; endl;
   }

   Foo(std::initializer_list&lt;Foo&gt; ilist) 
   {
       cout &lt;&lt; "initializer list" &lt;&lt; endl;
   }

   Foo(const Foo&amp; copy)
   {
       cout &lt;&lt; "copy ctor" &lt;&lt; endl;
   }
};

int main()
{

   Foo a;
   Foo b(a); 

   // This calls the copy constructor again! 
   //Shouldn't this call the initializer_list constructor?
   Foo c{b}; 



   _getch();
   return 0;
}
</code></pre>

<p>The output is:</p>

<p><strong>default ctor</strong></p>

<p><strong>copy ctor</strong></p>

<p><strong>copy ctor</strong></p>

<p>In the third case, I'm putting b into the brace-initialization which should call the initializer_list&lt;> constructor.</p>

<p>Instead, the copy constructor takes the lead.</p>

<p>Will someone of you tell me how this works and why?</p>
