void swap(bit_vector&) Container Swaps the contents of two bit_vectors.
void swap(bit_vector::reference x, bit_vector::reference y) bit_vector See below.
iterator insert(iterator pos, bool x) Sequence Inserts x before pos.
template <class InputIterator> void insert(iterator pos, InputIterator f, InputIterator l) [1] Sequence Inserts the range [f, l) before pos.
void insert(iterator pos, size_type n, bool x) Sequence Inserts n copies of x before pos.
void erase(iterator pos) Sequence Erases the element at position pos.
void erase(iterator first, iterator last) Sequence Erases the range [first, last)
void clear() Sequence Erases all of the elements.
bool operator==(const bit_vector&, const bit_vector&) Forward Container Tests two bit_vectors for equality. This is a global function, not a member function.
bool operator<(const bit_vector&, const bit_vector&) Forward Container Lexicographical comparison. This is a global function, not a member function.
New members

These members are not defined in the Random access container and Back insertion sequence requirements, but are specific to vector.

Member Description
reference A proxy class that acts as a reference to a single bit; the reason it exists is to allow expressions like V[0] = true. (A proxy class like this is necessary, because the C++ memory model does not include independent addressing of objects smaller than one byte.) The public member functions of reference are operator bool() const, reference& operator=(bool), and void flip(). That is, reference acts like an ordinary reference: you can convert a reference to bool, assign a bool value through a reference, or flip the bit that a reference refers to.
size_type capacity() const Number of bits for which memory has been allocated. capacity() is always greater than or equal to size(). [2] [3]
void reserve(size_type n) If n is less than or equal to capacity() , this call has no effect. Otherwise, it is a request for the allocation of additional memory. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged. [2] [4]
void swap(bit_vector::reference x, bit_vector::reference y) Swaps the bits referred to by x and y. This is a global function, not a member function. It is necessary because the ordinary version of swap takes arguments of type T&, and bit_vector::reference is a class, not a built-in C++ reference.
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату