Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
std::initializer_list< T > Class Template Reference

Implementation of std::initializer_list for brace initialization. More...

Public Types

using const_iterator = iterator
 The type of the iterator.
 
using const_reference = reference
 The type of a reference to the stored element.
 
using iterator = T const*
 The type of the iterator.
 
using reference = T const&
 The type of a reference to the stored element.
 
using size_type = size_t
 The type of the size.
 
using value_type = T
 The type of each element.
 

Public Member Functions

constexpr initializer_list () noexcept
 Construct an empty list.
 
constexpr auto begin () const noexcept -> iterator
 Get a pointer to the first element.
 
constexpr auto end () const noexcept -> iterator
 Get a pointer to one-past-the-last element.
 
constexpr auto size () const noexcept -> size_type
 Get the number of elements in the list.
 

Detailed Description

template<typename T>
class std::initializer_list< T >

Implementation of std::initializer_list for brace initialization.

Template Parameters
TThe type of the elements
Note
This is an interface for an internal compiler type

Member Typedef Documentation

◆ const_iterator

template<typename T>
using std::initializer_list< T >::const_iterator = iterator

The type of the iterator.

◆ const_reference

template<typename T>
using std::initializer_list< T >::const_reference = reference

The type of a reference to the stored element.

◆ iterator

template<typename T>
using std::initializer_list< T >::iterator = T const*

The type of the iterator.

◆ reference

template<typename T>
using std::initializer_list< T >::reference = T const&

The type of a reference to the stored element.

◆ size_type

template<typename T>
using std::initializer_list< T >::size_type = size_t

The type of the size.

◆ value_type

template<typename T>
using std::initializer_list< T >::value_type = T

The type of each element.

Constructor & Destructor Documentation

◆ initializer_list()

template<typename T>
std::initializer_list< T >::initializer_list ( )
inlineconstexprnoexcept

Construct an empty list.

Member Function Documentation

◆ begin()

template<typename T>
auto std::initializer_list< T >::begin ( ) const -> iterator
inlineconstexprnoexcept

Get a pointer to the first element.

Returns
A pointer to the first element

◆ end()

template<typename T>
auto std::initializer_list< T >::end ( ) const -> iterator
inlineconstexprnoexcept

Get a pointer to one-past-the-last element.

Returns
A pointer to one-past-the-last element

◆ size()

template<typename T>
auto std::initializer_list< T >::size ( ) const -> size_type
inlineconstexprnoexcept

Get the number of elements in the list.

Returns
The number of elements

The documentation for this class was generated from the following file: