Defined in: <initializer_list>
Overview
template< class T >
class initializer_list;
std::initializer_list
is a light container that holds objects from list initialization or braced initialization.
Memory
This section requires improvement. You can help by editing this doc page.
Technical details
Feature testing macros
Technical definition
std::initializer_list
Defined in | initializer_list |
Template parameters
pub | T | Type of the elements. |
Type names
pub | value_type | T |
pub | reference | const T& |
pub | const_reference | const T& |
pub | size_type | Unsigned integer type (usually std::size_t ) |
pub | iterator | const T* |
pub | const_iterator | const T* |
Member functions
pub | (constructors) | Constructs a initializer list. |
pub | (destructor) | Destroys the initializer list. |
Capacity
pub | size | Returns the number of elements. |
Iterators
pub | begin cbegin (since C++11) | Returns an |
pub | end cend (since C++11) | Returns an |
Non-member functions
pub | std::begin (std::initializer_list) | An overload for a std::begin. |
pub | std::end (std::initializer_list) | An overload for a std::end. |
Free function templates overloaded for std::initializer_list
pub | rbegin crbegin (since C++14) | Returns a reverse |
pub | rend crend (since C++14) | Returns a reverse |
pub | empty (since C++17) | Returns |
pub | data (since C++17) | Returns a pointer to the first element of the underlying array. |
Examples
This section requires improvement. You can help by editing this doc page.
Hover to see the original license.