Espacios de nombres
Variantes
Acciones

std::vector<bool>::reference

De cppreference.com
 
 
 
std::vector<bool>
Las funciones miembro
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.
Elemento acceso
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.
Los iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::vector<bool> specific
vector<bool>::flip
vector<bool>::swap
 
template<class Allocator>class vector<bool, Allocator>{// ...public:class reference {friendclass vector; reference();public: ~reference(); operator bool()const; reference& operator=(bool x); reference& operator=(const reference&);void flip();};// ...};

The std::vector<bool> specialization defines std::vector<bool>::reference as a publicly-accessible nested class. std::vector<bool>::reference proxies the behavior of references to a single bit in std::vector<bool>.

  • operator bool returns true when the bit is set.
  • The assignment operators set and clear the given bit.
  • flip inverts the state of the bit.

[editar]Ver también

Accede el elemento especificado.
(función miembro pública de std::vector<T,Allocator>)[editar]
close