std::initializer_list

std::initializer_list

(not to be confused with member initializer list).

Defined in header <initializer_list>
template< class T >
class initializer_list;
(since C++11)

An object of type std::initializer_list<T> is a lightweight proxy object that provides access to an array of objects of type const T.

A std::initializer_list object is automatically constructed when: