News for hackers. Stuff that matters.
Re:Initialization in C++ is Seriously Bonkers by slavik81 on Saturday January 05, 2019 @03:14PM (#18833943)
But a2 isn't an empty initializer list. A{} is the same as A(). You could use A{} even if there was no initializer list constructor. The squiggly brackets are from uniform initialization: a feature created to avoid the ambiguity between zero-argument constructors and zero-argument function declarations.

Unfortunately, std::initializer_list created a new ambiguity, so it's only an initializer list if it doesn't match an existing constructor.

There are no comments on this comment yet.