std::vector<bool>::reference – cppreference.com
Aus cppreference.com
<metanoindex/>
template <class Allocator> class vector<bool, Allocator> { // ... public: class reference { friend class 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 boolreturns true when the bit is set.- The assignment operators set and clear the given bit.
flipinverts the state of the bit.
Siehe auch
Zugriff auf angegebene Element Original: access specified element The text has been machine-translated via Google Translate. (öffentliche Elementfunktion of std::vector) [edit]
| |