[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/container/vector_bool [Back]  [Original]

std::vector<bool> cppreference.com
cppreference.com
Espaces de noms
Variantes

std::vector<bool>

De cppreference.com

<metanoindex/>

 
 
 
std::vector<bool>
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.
vector::vector
vector::~vector
vector::operator=
vector::assign
vector::get_allocator
Elment d'accs
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vector::at
vector::operator[]
vector::front
vector::back
Les itrateurs
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vector::begin
vector::cbegin

(C++11)
vector::end
vector::cend

(C++11)
vector::rbegin
vector::crbegin

(C++11)
vector::rend
vector::crend

(C++11)
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.
vector::empty
vector::size
vector::max_size
vector::reserve
vector::capacity
Modificateurs
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vector::clear
vector::insert
vector::erase
vector::push_back
vector::pop_back
vector::resize
vector::swap
std::vector<bool> specific
vector<bool>::flip
vector<bool>::swap
 
<tbody> </tbody>
Dclar dans l'en-tte <vector>
template<class Allocator = std::allocator<bool>> class vector<bool, Allocator>;

std::vector<bool> est une spcialisation plus efficace en espace de std::vector pour le type bool.

La manire dont std::vector<bool> est rendu efficace en espace (ainsi que le fait qu'elle est optimise ou pas) dpend de l'implmentation. Une optimisation potentielle consiste fusionner des lments du vecteur de sorte que chaque bit n'occupe qu'un seul bit rel au lieu d'un bool de la taille d'un octet.

std::vector<bool> se comporte comme std::vector, mais pour tre efficace en espace, il :

  • Ne stocke pas ncessairement ses donnes dans un seul bloc contigu de mmoire.
  • Expose std::vector<bool>::reference comme mthode d'accs des bits individuels.
  • N'utilise pas std::allocator_traits::construct pour construire des bits.

Types de membres

Type du membre Dfinition
value_type bool [edit]
allocator_type Allocator [edit]
size_type Dfini par l'implmentation[edit]
difference_type Dfini par l'implmentation [edit]
classe proxy qui reprsente une rfrence un seul bool
Original:
proxy class representing a reference to a single bool
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe)
const_reference bool [edit]
pointer
dfini par l'implmentation
Original:
implementation-defined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
const_pointer
dfini par l'implmentation
Original:
implementation-defined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
iterator
dfini par l'implmentation
Original:
implementation-defined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
const_iterator Dfini par l'implmentation[edit]
reverse_iterator std::reverse_iterator<iterator> [edit]
const_reverse_iterator std::reverse_iterator<const_iterator> [edit]

Fonctions membres

Construit le vector
(fonction membre publique de std::vector) [edit]
dtruit le vector
(fonction membre publique de std::vector) [edit]
Attribue les valeurs dans le conteneur
(fonction membre publique de std::vector) [edit]

Attribue les valeurs dans le conteneur
(fonction membre publique de std::vector) [edit]

Renvoie l'allocateur associ
(fonction membre publique de std::vector) [edit]

Elment d'accs
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
accde l'lment spcifi avec vrification de bornes
(fonction membre publique de std::vector) [edit]
accde l'lment spcifi
(fonction membre publique de std::vector) [edit]
accde au premier lment
(fonction membre publique de std::vector) [edit]
accde au dernier lment
(fonction membre publique de std::vector) [edit]
Les itrateurs
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
retourne un itrateur au dbut
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 de std::vector) [edit]
retourne un itrateur 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 de std::vector) [edit]
retourne un itrateur invers au dbut
(fonction membre publique de std::vector) [edit]
retourne un itrateur invers la fin
(fonction membre publique de std::vector) [edit]
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.
vrifie 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 de std::vector) [edit]
retourne le nombre d'lments
Original:
returns the 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 de std::vector) [edit]
retourne le plus grand nombre possible d'lments
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 de std::vector) [edit]
rserve de l'espace mmoire
(fonction membre publique de std::vector) [edit]
renvoie le nombre d'lments qui peuvent tre contenus dans l'espace mmoire actuellement allou
(fonction membre publique de std::vector) [edit]
Modificateurs
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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 de std::vector) [edit]
insre des lments
Original:
inserts 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 de std::vector) [edit]
efface des lments
(fonction membre publique de std::vector) [edit]
ajoute des lments la fin
Original:
adds elements 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 de std::vector) [edit]
supprime le dernier lment
Original:
removes the last 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 de std::vector) [edit]
modifie le nombre d'lments stocks
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 de std::vector) [edit]
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 de std::vector) [edit]
vector<bool> modificateurs spcifiques
Original:
vector<bool> specific modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
inverse tous les bits
(fonction membre publique) [edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
Echange deux std::vector<bool>::references
Original:
swaps two std::vector<bool>::references
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 statique) [edit]

Fonctions annexes

compare lexicographiquement les valeurs dans le vector
Original:
lexicographically compares the values in the vector
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction gnrique) [edit]
l'algorithme spcialis 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 gnrique) [edit]

Notes

Si la taille du champ de bits est connue au moment de la compilation, std::bitset peut tre utilis, car il offre un ensemble plus riche de fonctions membres. En outre, il existe boost::dynamic_bitset comme alternative std::vector<bool>.


Web Proxy Viewer  |  New URL  |  Original Page