Calling constructor with braces instead parantheses
问题 I recently realized that in C++11 we can call a delegating initializer-list constructor like Foo() : Foo{42} // delegate to Foo(initializer_list<>) Is this syntax correct? It seems to be, although I would have expected to always use parentheses when calling a function, like Foo({42}) . The example code below compiles fine in both clang++ and g++ #include <iostream> #include <initializer_list> struct Foo { Foo() : Foo{42} // I would have expected invalid syntax, use Foo({42}) { std::cout <<