News for hackers. Stuff that matters.
Re:Initialization in C++ is Seriously Bonkers by tines on Saturday January 05, 2019 @02:22PM (#18833631)
While it does sometimes seem like C++ does some things because of how much sense they don't make, I don't think this is one of those cases. Read the rest of the sentence you quoted and I think you'll find that the way C++ does it will make sense.
Re:Initialization in C++ is Seriously Bonkers by xyzzyz on Saturday January 05, 2019 @02:32PM (#18833684)
No, that reasoning is unsatisfactory. It would explain why A a; or A a(21, 37) calls A(); and A(int p, int q); respectively despite presence of A(std::initializer_list<int> l), but the initializer list constructor should still be called when one writes A a{} and A a{21, 37}. That would be consistent and predictable.