std::forward_list
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Défini dans l'entête <forward_list>
|
||
| template< class T, |
(depuis C++11) | |
La forward list est un conteneur qui permet l'insertion et la suppression rapide d'éléments situés à n'importe quelle position. L'accès aléatoire aux éléments n'est pas supporté. Elle est implémentée comme une liste simplement chaînée et ne souffre d'aucune lourdeur supplémentaire par rapport à l'implémentation en C. Par rapport à std::list ce conteneur permet d'optimiser l'occupation mémoire, lorsque l'itération bidirectionnelle n'est pas nécessaire .
std::forward_list répond aux exigences de Container (sauf pour la fonction membre size()), AllocatorAwareContainer et SequenceContainer .
Sommaire |
[modifier] Types membres
| Type membre | Definition |
value_type
|
T
|
allocator_type
|
Allocator
|
size_type
|
type intégral non signé (généralement size_t) |
difference_type
|
Signed integer type (usually ptrdiff_t) |
reference
|
value_type&
|
const_reference
|
const value_type&
|
pointer
|
std::allocator_traits<Allocator>::pointer |
const_pointer
|
std::allocator_traits<Allocator>::const_pointer |
iterator
|
ForwardIterator
|
const_iterator
|
Constant itérateur vers l'avant
Original: Constant forward iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier] Fonctions membres
| construit le forward_list Original: constructs the forward_list 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) | |
| Détruit le forward_list Original: destructs the forward_list 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) | |
| attribue des valeurs dans le récipient Original: assigns values to the container 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) | |
| attribue des valeurs dans le récipient Original: assigns values to the container 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) | |
| renvoie l'allocateur associé Original: returns the associated allocator 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) | |
Accès aux éléments | |
| accéder au premier élément Original: access 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) | |
Itérateurs | |
| retourne un itérateur sur l'élément avant de commencer Original: returns an iterator to the element before beginning 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) | |
| retourne un itérateur au début Original: returns an iterator to the beginning 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) | |
| retourne un itérateur à la fin Original: returns an iterator to the end 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) | |
Capacité | |
| vérifie si le conteneur est vide Original: checks whether the container is empty 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) | |
| retourne le plus grand nombre possible d'éléments Original: returns the maximum possible number of elements 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) | |
Modificateurs | |
| efface le contenu Original: clears the contents 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) | |
| insère des éléments après un élément Original: inserts elements after an 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) | |
| construit éléments en place après un élément Original: constructs elements in-place after an 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) | |
| efface un élément après un élément Original: erases an element after an 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) | |
| éléments insère au début Original: inserts elements to the beginning 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) | |
| construit éléments en place au début Original: constructs elements in-place at the beginning 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) | |
| supprime le premier élément Original: removes 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) | |
| modifie le nombre d'éléments stockés Original: changes the number of elements stored 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) | |
| permute les contenus Original: swaps the contents 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) | |
Opérations | |
| fusionne deux listes triées Original: merges two sorted lists 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) | |
| déplace les éléments d'un autre forward_list Original: moves elements from another forward_list 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) | |
| supprime des éléments répondant à des critères spécifiques Original: removes elements satisfying specific criteria 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) | |
| inverse l'ordre des éléments Original: reverses the order of the elements 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) | |
| supprime les doublons successifs Original: removes consecutive duplicate elements 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) | |
| trie les éléments Original: sorts the elements 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) | |
[modifier] Fonctions Tiers
| compare lexicographiquement les valeurs dans le forward_list Original: lexicographically compares the values in the forward_list The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
| l'algorithme spécialisé std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |