Описание тега initializer-list

NoneStd ::initializer_list is a special type in C++11 which is used to construct containers and other types from a list of values of the same type. May be implemented as a pair of pointers or pointer and length and its storage could be automatic, temporary, or static read-only.

std::initializer_list is a special type in C++11 which is used to construct containers and other types from a list of values.

A std::initializer_list<T> is an instantiation of a class template and refers to a sequence of objects of type T created by zero or more values enclosed in curly braces, e.g. { 0, 1, 1, 2, 3, 5, 8 }.

Related tags: uniform-initialization list-initialization