Espaces de noms
Variantes
Affichages
Actions

std::begin(std::initializer_list)

De cppreference.com

 
 
 
std::initializer_list
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
initializer_list::initializer_list
Capacité
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
initializer_list::size
Les itérateurs
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
initializer_list::begin
initializer_list::end
Tiers fonctions
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::begin
std::end
 
template< class E >
const E* begin( initializer_list<E> il );
(depuis C++11)
La spécialisation de std::begin pour initializer_list renvoie un pointeur sur le premier élément de il .
Original:
The specialization of std::begin for initializer_list returns a pointer to the first element of il.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Paramètres

il - an initializer_list

[modifier] Retourne la valeur

il.begin()

[modifier] Exceptions

noexcept specification:  
noexcept
   (depuis C++11)

[modifier] Exemple

#include <iostream>
 
int main() 
{
    // range-based for uses std::begin and std::end to iterate
    // over a given range; in this case, it's an initializer list
    for (int i : {3, 1, 4, 1}) {
        std::cout << i << '\n';
    }
}

Résultat :

3
1
4
1

[modifier] Voir aussi

renvoie un pointeur du premier élément
Original:
returns a pointer the first element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique) [edit]