Standard library header <initializer_list> (C++11)
From cppreference.net
C++
Standard library headers
Cet en-tête fait partie de la bibliothèque de support du langage .
Classes |
|
|
(C++11)
|
référence un tableau temporaire créé dans
l'initialisation de liste
(modèle de classe) |
Fonctions |
|
|
surcharge
std::begin
(modèle de fonction) |
|
|
(C++11)
|
spécialise
std::end
(modèle de fonction) |
Synopsis
// tous freestanding namespace std { template<class E> class initializer_list { public: using value_type = E; using reference = const E&; using const_reference = const E&; using size_type = size_t; using iterator = const E*; using const_iterator = const E*; constexpr initializer_list() noexcept; constexpr size_t size() const noexcept; // nombre d'éléments constexpr const E* begin() const noexcept; // premier élément constexpr const E* end() const noexcept; // un après le dernier élément }; // accès à la plage de la liste d'initialisation template<class E> constexpr const E* begin(initializer_list<E> il) noexcept; template<class E> constexpr const E* end(initializer_list<E> il) noexcept; }