Based on this code
cout << "default ctor" << endl;
cout << "initializer list" << endl;
Foo(const Foo& copy)
cout << "copy ctor" << endl;
// This calls the copy constructor again!
//Shouldn't this call the initializer_list constructor?
The output is:
In the third case, I'm putting b into the brace-initialization which should call the initializer_list<> constructor.
Instead, the copy constructor takes the lead.
Will someone of you tell me how this works and why?