In C++11 list-initialization refers to initializing a variable using curly braces
MyClass a1 {a}; // clearer and less error-prone than the other three MyClass a2 = {a}; MyClass a3 = a; MyClass a4(a); …
c++ c++11 syntax initialization list-initializationWhat does the statement return {}; in C++11 indicate, and when to use it instead of (say) return NULL; or return …
c++ c++11 return return-value list-initializationWhen I run this code: struct X { int a; }; struct Y : public X {}; X x = {0}; Y Y = {0}; I get: error: …
c++ c++11 struct list-initializationstd::array<std::pair<int, int>, 2> ids = { { 0, 1 }, { 1, 2 } }; VS2013 error: error C2440: 'initializing' : cannot convert from 'int' …
c++ c++11 std-pair stdarray list-initializationThe naive, optimistic and oh.. so wrong view of the c++11 uniform initialization syntax I thought that since C++11 user-defined …
c++ c++14 language-lawyer list-initialization aggregate-initialization