std::vector< bool, Alloc > Class Template Reference
[ContainersSequences]

A specialization of vector for booleans which offers fixed time access to individual elements in any order. More...

#include <stl_bvector.h>

Inheritance diagram for std::vector< bool, Alloc >:

Inheritance graph
[legend]
Collaboration diagram for std::vector< bool, Alloc >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef bool value_type
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef Bit_reference reference
typedef bool const_reference
typedef Bit_referencepointer
typedef const bool * const_pointer
typedef Bit_iterator iterator
typedef Bit_const_iterator const_iterator
typedef std::reverse_iterator<
const_iterator
const_reverse_iterator
typedef std::reverse_iterator<
iterator
reverse_iterator
typedef Bvector_base< Alloc
>::allocator_type 
allocator_type

Public Member Functions

allocator_type get_allocator () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
size_type size () const
size_type max_size () const
size_type capacity () const
bool empty () const
reference operator[] (size_type n)
const_reference operator[] (size_type n) const
void M_range_check (size_type n) const
reference at (size_type n)
const_reference at (size_type n) const
 vector (const allocator_type &a=allocator_type())
 vector (size_type n, bool value, const allocator_type &a=allocator_type())
 vector (size_type n)
 vector (const vector &x)
template<class Integer>
void M_initialize_dispatch (Integer n, Integer x, __true_type)
template<class InputIterator>
void M_initialize_dispatch (InputIterator first, InputIterator last, __false_type)
template<class InputIterator>
 vector (InputIterator first, InputIterator last, const allocator_type &a=allocator_type())
 ~vector ()
vectoroperator= (const vector &x)
void M_fill_assign (size_t n, bool x)
void assign (size_t n, bool x)
template<class InputIterator>
void assign (InputIterator first, InputIterator last)
template<class Integer>
void M_assign_dispatch (Integer n, Integer __val, __true_type)
template<class InputIterator>
void M_assign_dispatch (InputIterator first, InputIterator last, __false_type)
template<class InputIterator>
void M_assign_aux (InputIterator first, InputIterator last, input_iterator_tag)
template<class ForwardIterator>
void M_assign_aux (ForwardIterator first, ForwardIterator last, forward_iterator_tag)
void reserve (size_type n)
reference front ()
const_reference front () const
reference back ()
const_reference back () const
void push_back (bool x)
void swap (vector< bool, Alloc > &x)
iterator insert (iterator position, bool x=bool())
template<class Integer>
void M_insert_dispatch (iterator position, Integer n, Integer x, __true_type)
template<class InputIterator>
void M_insert_dispatch (iterator position, InputIterator first, InputIterator last, __false_type)
template<class InputIterator>
void insert (iterator position, InputIterator first, InputIterator last)
void M_fill_insert (iterator position, size_type n, bool x)
void insert (iterator position, size_type n, bool x)
void pop_back ()
iterator erase (iterator position)
iterator erase (iterator first, iterator last)
void resize (size_type new_size, bool x=bool())
void flip ()
void clear ()

Static Public Member Functions

static void swap (reference x, reference y)

Protected Member Functions

void M_initialize (size_type n)
void M_insert_aux (iterator position, bool x)
template<class InputIterator>
void M_initialize_range (InputIterator first, InputIterator last, input_iterator_tag)
template<class ForwardIterator>
void M_initialize_range (ForwardIterator first, ForwardIterator last, forward_iterator_tag)
template<class InputIterator>
void M_insert_range (iterator position, InputIterator first, InputIterator last, input_iterator_tag)
template<class ForwardIterator>
void M_insert_range (iterator position, ForwardIterator first, ForwardIterator last, forward_iterator_tag)
Bit_typeM_allocate (size_t n)
void M_deallocate ()

Protected Attributes

Bvector_impl M_impl

Detailed Description

template<typename Alloc>
class std::vector< bool, Alloc >

A specialization of vector for booleans which offers fixed time access to individual elements in any order.

Note that vector<bool> does not actually meet the requirements for being a container. This is because the reference and pointer types are not really references and pointers to bool. See DR96 for details.

See also:
vector for function documentation.
In some terminology a vector can be described as a dynamic C-style array, it offers fast and efficient access to individual elements in any order and saves the user from worrying about memory and size allocation. Subscripting ( [] ) access is also provided as with C-style arrays.

Definition at line 415 of file stl_bvector.h.


The documentation for this class was generated from the following file:
Generated on Sat Jul 15 16:22:06 2006 for libstdc++-v3 Source by  doxygen 1.4.7