STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
vector< _Bool, _Alloc > Class Template Reference
Inheritance diagram for vector< _Bool, _Alloc >:
_Vb_val< _Alloc > _Container_base0

Public Types

enum  { _EEN_VBITS = _VBITS }
 
typedef _STD vector< _Bool, _Alloc > _Myt
 
typedef _Vb_val< _Alloc > _Mybase
 
typedef _Mybase::_Alty _Alty
 
typedef _Mybase::_Vectype _Vectype
 
typedef _Alty::size_type size_type
 
typedef _Alty::difference_type difference_type
 
typedef _Bool _Ty
 
typedef _Alloc allocator_type
 
typedef _Vb_reference< _Altyreference
 
typedef bool const_reference
 
typedef bool value_type
 
typedef reference _Reft
 
typedef _Vb_const_iterator< _Altyconst_iterator
 
typedef _Vb_iterator< _Altyiterator
 
typedef iterator pointer
 
typedef const_iterator const_pointer
 
typedef _STD reverse_iterator< iteratorreverse_iterator
 
typedef _STD reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from _Vb_val< _Alloc >
typedef _STD vector< _Vbase, _Alloc > _Vectype
 
typedef _Vectype::_Alty _Alty
 
typedef _Alty::size_type size_type
 

Public Member Functions

 vector ()
 
 vector (const _Alloc &_Al)
 
 vector (size_type _Count, const bool &_Val=false)
 
 vector (size_type _Count, const bool &_Val, const _Alloc &_Al)
 
 vector (const _Myt &_Right)
 
 vector (const _Myt &_Right, const _Alloc &_Al)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 vector (_Iter _First, _Iter _Last)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 vector (_Iter _First, _Iter _Last, const _Alloc &_Al)
 
template<class _Iter >
void _BConstruct (_Iter _First, _Iter _Last)
 
 vector (_Myt &&_Right)
 
 vector (_Myt &&_Right, const _Alloc &_Al)
 
_Mytoperator= (_Myt &&_Right)
 
 vector (_XSTD initializer_list< bool > _Ilist, const _Alloc &_Al=allocator_type())
 
_Mytoperator= (_XSTD initializer_list< bool > _Ilist)
 
void assign (_XSTD initializer_list< bool > _Ilist)
 
iterator insert (const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
 
 ~vector () _NOEXCEPT
 
_Mytoperator= (const _Myt &_Right)
 
void reserve (size_type _Count)
 
size_type capacity () const _NOEXCEPT
 
iterator begin () _NOEXCEPT
 
const_iterator begin () const _NOEXCEPT
 
iterator end () _NOEXCEPT
 
const_iterator end () const _NOEXCEPT
 
const_iterator cbegin () const _NOEXCEPT
 
const_iterator cend () const _NOEXCEPT
 
const_reverse_iterator crbegin () const _NOEXCEPT
 
const_reverse_iterator crend () const _NOEXCEPT
 
void shrink_to_fit ()
 
iterator _Make_iter (const_iterator _Where)
 
reverse_iterator rbegin () _NOEXCEPT
 
const_reverse_iterator rbegin () const _NOEXCEPT
 
reverse_iterator rend () _NOEXCEPT
 
const_reverse_iterator rend () const _NOEXCEPT
 
void resize (size_type _Newsize, bool _Val=false)
 
size_type size () const _NOEXCEPT
 
size_type max_size () const _NOEXCEPT
 
bool empty () const _NOEXCEPT
 
_Alloc get_allocator () const _NOEXCEPT
 
const_reference at (size_type _Off) const
 
reference at (size_type _Off)
 
const_reference operator[] (size_type _Off) const
 
reference operator[] (size_type _Off)
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void push_back (const bool &_Val)
 
void pop_back ()
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, void >::type assign (_Iter _First, _Iter _Last)
 
void assign (size_type _Count, const bool &_Val)
 
iterator insert (const_iterator _Where, const bool &_Val)
 
iterator insert (const_iterator _Where, size_type _Count, const bool &_Val)
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, iterator >::type insert (const_iterator _Where, _Iter _First, _Iter _Last)
 
template<class _Iter >
void _Insert (const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
 
template<class _Iter >
void _Insert (const_iterator _Where, _Iter _First, _Iter _Last, forward_iterator_tag)
 
iterator erase (const_iterator _Where_arg)
 
iterator erase (const_iterator _First_arg, const_iterator _Last_arg)
 
void clear () _NOEXCEPT
 
void flip () _NOEXCEPT
 
void swap (_Myt &_Right)
 
size_t hash () const
 
iterator _Insert_n (const_iterator _Where, size_type _Count, const bool &_Val)
 
size_type _Insert_x (const_iterator _Where, size_type _Count)
 
void _Orphan_range (size_type, size_type) const
 
void _Trim (size_type _Size)
 
 __declspec (noreturn) void _Xlen() const
 
 __declspec (noreturn) void _Xran() const
 
- Public Member Functions inherited from _Vb_val< _Alloc >
 _Vb_val (size_type _Count, const bool &_Val, const _Alloc &_Al=_Alloc())
 
 _Vb_val (const _Vb_val &_Right)
 
 _Vb_val (const _Vb_val &_Right, const _Alloc &_Al)
 
 _Vb_val (_Vb_val &&_Right)
 
 _Vb_val (_Vb_val &&_Right, const _Alloc &_Al)
 
 ~_Vb_val () _NOEXCEPT
 
void _Swap_alloc (_Vb_val &)
 
void _Alloc_proxy ()
 
void _Free_proxy ()
 
- Public Member Functions inherited from _Container_base0
void _Orphan_all ()
 
void _Swap_all (_Container_base0 &)
 

Static Public Member Functions

static void swap (reference _Left, reference _Right) _NOEXCEPT
 
- Static Public Member Functions inherited from _Vb_val< _Alloc >
static size_type _Nw (size_type _Count)
 

Static Public Attributes

static const int _VBITS = _STD _VBITS
 

Additional Inherited Members

- Public Attributes inherited from _Vb_val< _Alloc >
_Vectype _Myvec
 
_Alty::size_type _Mysize
 

Member Typedef Documentation

template<class _Alloc >
typedef _Mybase::_Alty vector< _Bool, _Alloc >::_Alty
template<class _Alloc >
typedef _Vb_val<_Alloc> vector< _Bool, _Alloc >::_Mybase
template<class _Alloc >
typedef _STD vector<_Bool, _Alloc> vector< _Bool, _Alloc >::_Myt
template<class _Alloc >
typedef reference vector< _Bool, _Alloc >::_Reft
template<class _Alloc >
typedef _Bool vector< _Bool, _Alloc >::_Ty
template<class _Alloc >
typedef _Mybase::_Vectype vector< _Bool, _Alloc >::_Vectype
template<class _Alloc >
typedef _Alloc vector< _Bool, _Alloc >::allocator_type
template<class _Alloc >
typedef _Vb_const_iterator<_Alty> vector< _Bool, _Alloc >::const_iterator
template<class _Alloc >
typedef const_iterator vector< _Bool, _Alloc >::const_pointer
template<class _Alloc >
typedef bool vector< _Bool, _Alloc >::const_reference
template<class _Alloc >
typedef _STD reverse_iterator<const_iterator> vector< _Bool, _Alloc >::const_reverse_iterator
template<class _Alloc >
typedef _Alty::difference_type vector< _Bool, _Alloc >::difference_type
template<class _Alloc >
typedef _Vb_iterator<_Alty> vector< _Bool, _Alloc >::iterator
template<class _Alloc >
typedef iterator vector< _Bool, _Alloc >::pointer
template<class _Alloc >
typedef _Vb_reference<_Alty> vector< _Bool, _Alloc >::reference
template<class _Alloc >
typedef _STD reverse_iterator<iterator> vector< _Bool, _Alloc >::reverse_iterator
template<class _Alloc >
typedef _Alty::size_type vector< _Bool, _Alloc >::size_type
template<class _Alloc >
typedef bool vector< _Bool, _Alloc >::value_type

Member Enumeration Documentation

template<class _Alloc >
anonymous enum
Enumerator
_EEN_VBITS 
2441 {_EEN_VBITS = _VBITS}; // helper for expression evaluator
static const int _VBITS
Definition: vector:2440

Constructor & Destructor Documentation

template<class _Alloc >
vector< _Bool, _Alloc >::vector ( )
inline
2443  : _Mybase(0, false)
2444  { // construct empty vector
2445  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( const _Alloc &  _Al)
inlineexplicit
2448  : _Mybase(0, false, _Al)
2449  { // construct empty vector, allocator
2450  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( size_type  _Count,
const bool _Val = false 
)
inlineexplicit
2453  : _Mybase(_Count, _Val)
2454  { // construct from _Count * _Val
2455  _Trim(_Count);
2456  }
void _Trim(size_type _Size)
Definition: vector:2977
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( size_type  _Count,
const bool _Val,
const _Alloc &  _Al 
)
inline
2459  : _Mybase(_Count, _Val, _Al)
2460  { // construct from _Count * _Val, allocator
2461  _Trim(_Count);
2462  }
void _Trim(size_type _Size)
Definition: vector:2977
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( const _Myt _Right)
inline
2465  : _Mybase(_Right)
2466  { // construct by copying _Right
2467  }
const _Ty & _Right
Definition: algorithm:4087
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( const _Myt _Right,
const _Alloc &  _Al 
)
inline
2470  : _Mybase(_Right, _Al)
2471  { // construct by copying _Right, allocator
2472  }
const _Ty & _Right
Definition: algorithm:4087
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
vector< _Bool, _Alloc >::vector ( _Iter  _First,
_Iter  _Last 
)
inline
2478  : _Mybase(0, false)
2479  { // construct from [_First, _Last)
2480  _BConstruct(_First, _Last);
2481  }
void _BConstruct(_Iter _First, _Iter _Last)
Definition: vector:2493
_FwdIt _Last
Definition: algorithm:1936
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
vector< _Bool, _Alloc >::vector ( _Iter  _First,
_Iter  _Last,
const _Alloc &  _Al 
)
inline
2487  : _Mybase(0, false, _Al)
2488  { // construct from [_First, _Last), allocator
2489  _BConstruct(_First, _Last);
2490  }
void _BConstruct(_Iter _First, _Iter _Last)
Definition: vector:2493
_FwdIt _Last
Definition: algorithm:1936
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( _Myt &&  _Right)
inline
2499  : _Mybase(_STD forward<_Myt>(_Right))
2500  { // move construct by moving _Right
2501  }
const _Ty & _Right
Definition: algorithm:4087
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( _Myt &&  _Right,
const _Alloc &  _Al 
)
inline
2504  : _Mybase(_STD forward<_Myt>(_Right), _Al)
2505  { // move construct by moving _Right, allocator
2506  }
const _Ty & _Right
Definition: algorithm:4087
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::vector ( _XSTD initializer_list< bool _Ilist,
const _Alloc &  _Al = allocator_type() 
)
inline
2533  : _Mybase(0, false, _Al)
2534  { // construct from initializer_list
2535  insert(begin(), _Ilist.begin(), _Ilist.end());
2536  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
iterator begin() _NOEXCEPT
Definition: vector:2577
_Vb_val< _Alloc > _Mybase
Definition: vector:2418
template<class _Alloc >
vector< _Bool, _Alloc >::~vector ( )
inline
2556  { // destroy the object
2557  this->_Mysize = 0;
2558  }
_Alty::size_type _Mysize
Definition: vector:2407

Member Function Documentation

template<class _Alloc >
vector< _Bool, _Alloc >::__declspec ( noreturn  ) const
inline
2993  { // report a length_error
2994  _Xlength_error("vector<bool> too long");
2995  }
template<class _Alloc >
vector< _Bool, _Alloc >::__declspec ( noreturn  ) const
inline
2998  { // report an out_of_range error
2999  _Xout_of_range("invalid vector<bool> subscript");
3000  }
template<class _Alloc >
template<class _Iter >
void vector< _Bool, _Alloc >::_BConstruct ( _Iter  _First,
_Iter  _Last 
)
inline
2494  { // initialize from [_First, _Last), input iterators
2495  insert(begin(), _First, _Last);
2496  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
iterator begin() _NOEXCEPT
Definition: vector:2577
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
template<class _Iter >
void vector< _Bool, _Alloc >::_Insert ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
input_iterator_tag   
)
inline
2787  { // insert [_First, _Last) at _Where, input iterators
2788  size_type _Off = _Where - begin();
2789 
2790  for (; _First != _Last; ++_First, ++_Off)
2791  insert(begin() + _Off, *_First);
2792  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
iterator begin() _NOEXCEPT
Definition: vector:2577
_Alty::size_type size_type
Definition: vector:2422
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
template<class _Iter >
void vector< _Bool, _Alloc >::_Insert ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
forward_iterator_tag   
)
inline
2798  { // insert [_First, _Last) at _Where, forward iterators
2799  _DEBUG_RANGE(_First, _Last);
2800  size_type _Count = 0;
2801  _Distance(_First, _Last, _Count);
2802 
2803  size_type _Off = _Insert_x(_Where, _Count);
2804  _STD copy(_First, _Last, begin() + _Off);
2805  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2072
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
void _Distance(_InIt _First, _InIt _Last, _Diff &_Off)
Definition: xutility:764
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:2914
iterator begin() _NOEXCEPT
Definition: vector:2577
_Alty::size_type size_type
Definition: vector:2422
_Diff _Count
Definition: algorithm:1941
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
iterator vector< _Bool, _Alloc >::_Insert_n ( const_iterator  _Where,
size_type  _Count,
const bool _Val 
)
inline
2908  { // insert _Count * _Val at _Where
2909  size_type _Off = _Insert_x(_Where, _Count);
2910  _STD fill(begin() + _Off, begin() + (_Off + _Count), _Val);
2911  return (begin() + _Off);
2912  }
void fill(_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
Definition: xutility:2620
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:2914
iterator begin() _NOEXCEPT
Definition: vector:2577
_Alty::size_type size_type
Definition: vector:2422
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
size_type vector< _Bool, _Alloc >::_Insert_x ( const_iterator  _Where,
size_type  _Count 
)
inline
2915  { // make room to insert _Count elements at _Where
2916  size_type _Off = _Where - begin();
2917 
2918  #if _ITERATOR_DEBUG_LEVEL == 2
2919  if (end() < _Where)
2920  _DEBUG_ERROR("vector<bool> insert iterator outside range");
2921  bool _Realloc = capacity() - size() < _Count;
2922  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2923 
2924  if (_Count == 0)
2925  ;
2926  else if (max_size() - size() < _Count)
2927  _Xlen(); // result too long
2928  else
2929  { // worth doing
2930  this->_Myvec.resize(this->_Nw(size() + _Count), 0);
2931  if (empty())
2932  this->_Mysize += _Count;
2933  else
2934  { // make room and copy down suffix
2935  iterator _Oldend = end();
2936  this->_Mysize += _Count;
2937  _STD copy_backward(begin() + _Off, _Oldend, end());
2938  }
2939 
2940  #if _ITERATOR_DEBUG_LEVEL == 2
2941  _Orphan_range(_Realloc ? 0 : _Off, this->_Mysize);
2942  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2943  }
2944  return (_Off);
2945  }
_Alty::size_type _Mysize
Definition: vector:2407
Definition: xutility:337
size_type capacity() const _NOEXCEPT
Definition: vector:2572
bool empty() const _NOEXCEPT
Definition: vector:2680
static size_type _Nw(size_type _Count)
Definition: vector:2401
size_type size() const _NOEXCEPT
Definition: vector:2668
_BidIt2 copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
Definition: xutility:2373
_Vectype _Myvec
Definition: vector:2406
iterator begin() _NOEXCEPT
Definition: vector:2577
void _Orphan_range(size_type, size_type) const
Definition: vector:2972
_Alty::size_type size_type
Definition: vector:2422
iterator end() _NOEXCEPT
Definition: vector:2587
_Diff _Count
Definition: algorithm:1941
size_type max_size() const _NOEXCEPT
Definition: vector:2673
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
template<class _Alloc >
iterator vector< _Bool, _Alloc >::_Make_iter ( const_iterator  _Where)
inline
2633  { // make iterator from const_iterator
2634  iterator _Tmp = begin();
2635  if (0 < this->_Mysize)
2636  _Tmp += _Where - begin();
2637  return (_Tmp);
2638  }
_Alty::size_type _Mysize
Definition: vector:2407
Definition: xutility:337
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
void vector< _Bool, _Alloc >::_Orphan_range ( size_type  ,
size_type   
) const
inline
2973  { // orphan iterators within specified (inclusive) range
2974  }
template<class _Alloc >
void vector< _Bool, _Alloc >::_Trim ( size_type  _Size)
inline
2978  { // trim base vector to exact length in bits
2979  if (max_size() < _Size)
2980  _Xlen(); // result too long
2981  size_type _Words = this->_Nw(_Size);
2982 
2983  if (_Words < this->_Myvec.size())
2984  this->_Myvec.erase(this->_Myvec.begin() + _Words,
2985  this->_Myvec.end());
2986  this->_Mysize = _Size;
2987  _Size %= _VBITS;
2988  if (0 < _Size)
2989  this->_Myvec[_Words - 1] &= (_Vbase)((1 << _Size) - 1);
2990  }
unsigned int _Vbase
Definition: vector:1847
_Alty::size_type _Mysize
Definition: vector:2407
static size_type _Nw(size_type _Count)
Definition: vector:2401
_Vectype _Myvec
Definition: vector:2406
_Alty::size_type size_type
Definition: vector:2422
static const int _VBITS
Definition: vector:2440
size_type max_size() const _NOEXCEPT
Definition: vector:2673
_Check_return_ _In_ long _Size
Definition: io.h:325
template<class _Alloc >
void vector< _Bool, _Alloc >::assign ( _XSTD initializer_list< bool _Ilist)
inline
2545  { // assign initializer_list
2546  assign(_Ilist.begin(), _Ilist.end());
2547  }
void assign(_XSTD initializer_list< bool > _Ilist)
Definition: vector:2544
template<class _Alloc >
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, void>::type vector< _Bool, _Alloc >::assign ( _Iter  _First,
_Iter  _Last 
)
inline
2752  { // assign [_First, _Last), input iterators
2753  erase(begin(), end());
2754  insert(begin(), _First, _Last);
2755  }
iterator erase(const_iterator _Where_arg)
Definition: vector:2807
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
iterator begin() _NOEXCEPT
Definition: vector:2577
iterator end() _NOEXCEPT
Definition: vector:2587
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< _Bool, _Alloc >::assign ( size_type  _Count,
const bool _Val 
)
inline
2758  { // assign _Count * _Val
2759  erase(begin(), end());
2760  _Insert_n(begin(), _Count, _Val);
2761  }
iterator erase(const_iterator _Where_arg)
Definition: vector:2807
iterator begin() _NOEXCEPT
Definition: vector:2577
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2906
iterator end() _NOEXCEPT
Definition: vector:2587
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
const_reference vector< _Bool, _Alloc >::at ( size_type  _Off) const
inline
2691  { // subscript nonmutable sequence with checking
2692  if (size() <= _Off)
2693  _Xran();
2694  return ((*this)[_Off]);
2695  }
size_type size() const _NOEXCEPT
Definition: vector:2668
template<class _Alloc >
reference vector< _Bool, _Alloc >::at ( size_type  _Off)
inline
2698  { // subscript mutable sequence with checking
2699  if (size() <= _Off)
2700  _Xran();
2701  return ((*this)[_Off]);
2702  }
size_type size() const _NOEXCEPT
Definition: vector:2668
template<class _Alloc >
reference vector< _Bool, _Alloc >::back ( )
inline
2729  { // return last element of mutable sequence
2730  return (*(end() - 1));
2731  }
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
const_reference vector< _Bool, _Alloc >::back ( ) const
inline
2734  { // return last element of nonmutable sequence
2735  return (*(end() - 1));
2736  }
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
iterator vector< _Bool, _Alloc >::begin ( )
inline
2578  { // return iterator for beginning of mutable sequence
2579  return (iterator((_Vbase *)this->_Myvec._Myfirst, this));
2580  }
unsigned int _Vbase
Definition: vector:1847
_Vectype _Myvec
Definition: vector:2406
_Vb_iterator< _Alty > iterator
Definition: vector:2433
template<class _Alloc >
const_iterator vector< _Bool, _Alloc >::begin ( ) const
inline
2583  { // return iterator for beginning of nonmutable sequence
2584  return (const_iterator((_Vbase *)this->_Myvec._Myfirst, this));
2585  }
unsigned int _Vbase
Definition: vector:1847
_Vectype _Myvec
Definition: vector:2406
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2432
template<class _Alloc >
size_type vector< _Bool, _Alloc >::capacity ( ) const
inline
2573  { // return current length of allocated storage
2574  return (this->_Myvec.capacity() * _VBITS);
2575  }
_Vectype _Myvec
Definition: vector:2406
static const int _VBITS
Definition: vector:2440
template<class _Alloc >
const_iterator vector< _Bool, _Alloc >::cbegin ( ) const
inline
2604  { // return iterator for beginning of nonmutable sequence
2605  return (((const _Myt *)this)->begin());
2606  }
_STD vector< _Bool, _Alloc > _Myt
Definition: vector:2417
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
const_iterator vector< _Bool, _Alloc >::cend ( ) const
inline
2609  { // return iterator for end of nonmutable sequence
2610  return (((const _Myt *)this)->end());
2611  }
_STD vector< _Bool, _Alloc > _Myt
Definition: vector:2417
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
void vector< _Bool, _Alloc >::clear ( )
inline
2851  { // erase all elements
2852  erase(begin(), end());
2853  }
iterator erase(const_iterator _Where_arg)
Definition: vector:2807
iterator begin() _NOEXCEPT
Definition: vector:2577
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
const_reverse_iterator vector< _Bool, _Alloc >::crbegin ( ) const
inline
2614  { // return iterator for beginning of reversed nonmutable sequence
2615  return (((const _Myt *)this)->rbegin());
2616  }
_STD vector< _Bool, _Alloc > _Myt
Definition: vector:2417
reverse_iterator rbegin() _NOEXCEPT
Definition: vector:2640
template<class _Alloc >
const_reverse_iterator vector< _Bool, _Alloc >::crend ( ) const
inline
2619  { // return iterator for end of reversed nonmutable sequence
2620  return (((const _Myt *)this)->rend());
2621  }
reverse_iterator rend() _NOEXCEPT
Definition: vector:2650
_STD vector< _Bool, _Alloc > _Myt
Definition: vector:2417
template<class _Alloc >
bool vector< _Bool, _Alloc >::empty ( ) const
inline
2681  { // test if sequence is empty
2682  return (size() == 0);
2683  }
size_type size() const _NOEXCEPT
Definition: vector:2668
template<class _Alloc >
iterator vector< _Bool, _Alloc >::end ( )
inline
2588  { // return iterator for end of mutable sequence
2589  iterator _Tmp = begin();
2590  if (0 < this->_Mysize)
2591  _Tmp += this->_Mysize;
2592  return (_Tmp);
2593  }
_Alty::size_type _Mysize
Definition: vector:2407
Definition: xutility:337
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
const_iterator vector< _Bool, _Alloc >::end ( ) const
inline
2596  { // return iterator for end of nonmutable sequence
2597  const_iterator _Tmp = begin();
2598  if (0 < this->_Mysize)
2599  _Tmp += this->_Mysize;
2600  return (_Tmp);
2601  }
_Alty::size_type _Mysize
Definition: vector:2407
iterator begin() _NOEXCEPT
Definition: vector:2577
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2432
template<class _Alloc >
iterator vector< _Bool, _Alloc >::erase ( const_iterator  _Where_arg)
inline
2808  { // erase element at _Where
2809  iterator _Where = _Make_iter(_Where_arg);
2810  size_type _Off = _Where - begin();
2811 
2812  #if _ITERATOR_DEBUG_LEVEL == 2
2813  if (end() <= _Where)
2814  _DEBUG_ERROR("vector<bool> erase iterator outside range");
2815  _STD copy(_Where + 1, end(), _Where);
2816  _Orphan_range(_Off, this->_Mysize);
2817 
2818  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
2819  _STD copy(_Where + 1, end(), _Where);
2820  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2821 
2822  _Trim(this->_Mysize - 1);
2823  return (begin() + _Off);
2824  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2072
iterator _Make_iter(const_iterator _Where)
Definition: vector:2632
_Alty::size_type _Mysize
Definition: vector:2407
Definition: xutility:337
void _Trim(size_type _Size)
Definition: vector:2977
iterator begin() _NOEXCEPT
Definition: vector:2577
void _Orphan_range(size_type, size_type) const
Definition: vector:2972
_Alty::size_type size_type
Definition: vector:2422
iterator end() _NOEXCEPT
Definition: vector:2587
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
template<class _Alloc >
iterator vector< _Bool, _Alloc >::erase ( const_iterator  _First_arg,
const_iterator  _Last_arg 
)
inline
2827  { // erase [_First, _Last)
2828  iterator _First = _Make_iter(_First_arg);
2829  iterator _Last = _Make_iter(_Last_arg);
2830  size_type _Off = _First - begin();
2831 
2832  if (_First != _Last)
2833  { // worth doing, copy down over hole
2834  #if _ITERATOR_DEBUG_LEVEL == 2
2835  if (_Last < _First || end() < _Last)
2836  _DEBUG_ERROR("vector<bool> erase iterator outside range");
2837  iterator _Next = _STD copy(_Last, end(), _First);
2838  size_type _Newsize = _Next - begin();
2839  _Orphan_range(_Newsize, this->_Mysize);
2840  _Trim(_Newsize);
2841 
2842  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
2843  iterator _Next = _STD copy(_Last, end(), _First);
2844  _Trim(_Next - begin());
2845  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2846  }
2847  return (begin() + _Off);
2848  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2072
iterator _Make_iter(const_iterator _Where)
Definition: vector:2632
_Alty::size_type _Mysize
Definition: vector:2407
Definition: xutility:337
void _Trim(size_type _Size)
Definition: vector:2977
iterator begin() _NOEXCEPT
Definition: vector:2577
void _Orphan_range(size_type, size_type) const
Definition: vector:2972
_Alty::size_type size_type
Definition: vector:2422
iterator end() _NOEXCEPT
Definition: vector:2587
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< _Bool, _Alloc >::flip ( )
inline
2856  { // toggle all elements
2857  for (typename _Vectype::iterator _Next = this->_Myvec.begin();
2858  _Next != this->_Myvec.end(); ++_Next)
2859  *_Next = (_Vbase)~*_Next;
2860  _Trim(this->_Mysize);
2861  }
unsigned int _Vbase
Definition: vector:1847
_Alty::size_type _Mysize
Definition: vector:2407
void _Trim(size_type _Size)
Definition: vector:2977
_Vectype _Myvec
Definition: vector:2406
template<class _Alloc >
reference vector< _Bool, _Alloc >::front ( )
inline
2719  { // return first element of mutable sequence
2720  return (*begin());
2721  }
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
const_reference vector< _Bool, _Alloc >::front ( ) const
inline
2724  { // return first element of nonmutable sequence
2725  return (*begin());
2726  }
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
_Alloc vector< _Bool, _Alloc >::get_allocator ( ) const
inline
2686  { // return allocator object for values
2687  return (this->_Myvec.get_allocator());
2688  }
_Vectype _Myvec
Definition: vector:2406
template<class _Alloc >
size_t vector< _Bool, _Alloc >::hash ( ) const
inline
2901  { // hash bits to size_t value by pseudorandomizing transform
2902  return (_Hash_seq((const unsigned char *)this->_Myvec.data(),
2903  this->_Myvec.size() * sizeof (_Vbase)));
2904  }
unsigned int _Vbase
Definition: vector:1847
_STD_BEGIN size_t _Hash_seq(const unsigned char *_First, size_t _Count)
Definition: xstddef:279
_Vectype _Myvec
Definition: vector:2406
template<class _Alloc >
iterator vector< _Bool, _Alloc >::insert ( const_iterator  _Where,
_XSTD initializer_list< bool _Ilist 
)
inline
2551  { // insert initializer_list
2552  return (insert(_Where, _Ilist.begin(), _Ilist.end()));
2553  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
template<class _Alloc >
iterator vector< _Bool, _Alloc >::insert ( const_iterator  _Where,
const bool _Val 
)
inline
2764  { // insert _Val at _Where
2765  return (_Insert_n(_Where, (size_type)1, _Val));
2766  }
_Alty::size_type size_type
Definition: vector:2422
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2906
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
iterator vector< _Bool, _Alloc >::insert ( const_iterator  _Where,
size_type  _Count,
const bool _Val 
)
inline
2770  { // insert _Count * _Val at _Where
2771  return (_Insert_n(_Where, _Count, _Val));
2772  }
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2906
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, iterator>::type vector< _Bool, _Alloc >::insert ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last 
)
inline
2778  { // insert [_First, _Last) at _Where
2779  size_type _Off = _Where - begin();
2780  _Insert(_Where, _First, _Last, _Iter_cat(_First));
2781  return (begin() + _Off);
2782  }
void _Insert(const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: vector:2785
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
iterator begin() _NOEXCEPT
Definition: vector:2577
_Alty::size_type size_type
Definition: vector:2422
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
size_type vector< _Bool, _Alloc >::max_size ( ) const
inline
2674  { // return maximum possible length of sequence
2675  const size_type _Maxsize = this->_Myvec.max_size();
2676  return (_Maxsize < (size_type)(-1) / _VBITS
2677  ? _Maxsize * _VBITS : (size_type)(-1));
2678  }
_Vectype _Myvec
Definition: vector:2406
_Alty::size_type size_type
Definition: vector:2422
static const int _VBITS
Definition: vector:2440
template<class _Alloc >
_Myt& vector< _Bool, _Alloc >::operator= ( _Myt &&  _Right)
inline
2509  { // assign by moving _Right
2510  if (this != &_Right)
2511  { // different, assign it
2512  clear();
2513 
2514  if (_Alty::propagate_on_container_move_assignment::value
2515  && this->get_allocator() != _Right.get_allocator())
2516  { // assign vector, dumping proxy
2517  this->_Free_proxy();
2518  this->_Myvec = _STD move(_Right._Myvec);
2519  this->_Alloc_proxy();
2520  }
2521  else
2522  this->_Myvec = _STD move(_Right._Myvec);
2523 
2524 
2525  this->_Mysize = _Right._Mysize;
2526  _Right._Mysize = 0;
2527  }
2528  return (*this);
2529  }
void _Free_proxy()
Definition: vector:2371
void clear() _NOEXCEPT
Definition: vector:2850
_Alty::size_type _Mysize
Definition: vector:2407
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
void _Alloc_proxy()
Definition: vector:2367
_Vectype _Myvec
Definition: vector:2406
const _Ty & _Right
Definition: algorithm:4087
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:2685
template<class _Alloc >
_Myt& vector< _Bool, _Alloc >::operator= ( _XSTD initializer_list< bool _Ilist)
inline
2539  { // assign initializer_list
2540  assign(_Ilist.begin(), _Ilist.end());
2541  return (*this);
2542  }
void assign(_XSTD initializer_list< bool > _Ilist)
Definition: vector:2544
template<class _Alloc >
_Myt& vector< _Bool, _Alloc >::operator= ( const _Myt _Right)
inline
2561  { // assign from _Right
2562  this->_Mysize = _Right._Mysize;
2563  this->_Myvec = _Right._Myvec;
2564  return (*this);
2565  }
_Alty::size_type _Mysize
Definition: vector:2407
_Vectype _Myvec
Definition: vector:2406
const _Ty & _Right
Definition: algorithm:4087
template<class _Alloc >
const_reference vector< _Bool, _Alloc >::operator[] ( size_type  _Off) const
inline
2705  { // subscript nonmutable sequence
2706  const_iterator _It = begin();
2707  _It._Advance(_Off);
2708  return (*_It);
2709  }
iterator begin() _NOEXCEPT
Definition: vector:2577
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2432
template<class _Alloc >
reference vector< _Bool, _Alloc >::operator[] ( size_type  _Off)
inline
2712  { // subscript mutable sequence
2713  iterator _It = begin();
2714  _It._Advance(_Off);
2715  return (*_It);
2716  }
Definition: xutility:337
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
void vector< _Bool, _Alloc >::pop_back ( )
inline
2744  { // erase element at end
2745  erase(end() - 1);
2746  }
iterator erase(const_iterator _Where_arg)
Definition: vector:2807
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
void vector< _Bool, _Alloc >::push_back ( const bool _Val)
inline
2739  { // insert element at end
2740  insert(end(), _Val);
2741  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2549
iterator end() _NOEXCEPT
Definition: vector:2587
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
reverse_iterator vector< _Bool, _Alloc >::rbegin ( )
inline
2641  { // return iterator for beginning of reversed mutable sequence
2642  return (reverse_iterator(end()));
2643  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2437
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
const_reverse_iterator vector< _Bool, _Alloc >::rbegin ( ) const
inline
2646  { // return iterator for beginning of reversed nonmutable sequence
2647  return (const_reverse_iterator(end()));
2648  }
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2438
iterator end() _NOEXCEPT
Definition: vector:2587
template<class _Alloc >
reverse_iterator vector< _Bool, _Alloc >::rend ( )
inline
2651  { // return iterator for end of reversed mutable sequence
2652  return (reverse_iterator(begin()));
2653  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2437
iterator begin() _NOEXCEPT
Definition: vector:2577
template<class _Alloc >
const_reverse_iterator vector< _Bool, _Alloc >::rend ( ) const
inline
2656  { // return iterator for end of reversed nonmutable sequence
2657  return (const_reverse_iterator(begin()));
2658  }
iterator begin() _NOEXCEPT
Definition: vector:2577
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2438
template<class _Alloc >
void vector< _Bool, _Alloc >::reserve ( size_type  _Count)
inline
2568  { // determine new minimum length of allocated storage
2569  this->_Myvec.reserve(this->_Nw(_Count));
2570  }
static size_type _Nw(size_type _Count)
Definition: vector:2401
_Vectype _Myvec
Definition: vector:2406
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
void vector< _Bool, _Alloc >::resize ( size_type  _Newsize,
bool  _Val = false 
)
inline
2661  { // determine new length, padding with _Val elements as needed
2662  if (size() < _Newsize)
2663  _Insert_n(end(), _Newsize - size(), _Val);
2664  else if (_Newsize < size())
2665  erase(begin() + _Newsize, end());
2666  }
iterator erase(const_iterator _Where_arg)
Definition: vector:2807
size_type size() const _NOEXCEPT
Definition: vector:2668
iterator begin() _NOEXCEPT
Definition: vector:2577
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2906
iterator end() _NOEXCEPT
Definition: vector:2587
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
void vector< _Bool, _Alloc >::shrink_to_fit ( )
inline
2624  { // reduce capacity
2625  if (this->_Myvec._Has_unused_capacity())
2626  { // worth shrinking, do it
2627  _Myt _Tmp(*this);
2628  swap(_Tmp);
2629  }
2630  }
void swap(_Myt &_Right)
Definition: vector:2863
_STD vector< _Bool, _Alloc > _Myt
Definition: vector:2417
_Vectype _Myvec
Definition: vector:2406
template<class _Alloc >
size_type vector< _Bool, _Alloc >::size ( ) const
inline
2669  { // return length of sequence
2670  return (this->_Mysize);
2671  }
_Alty::size_type _Mysize
Definition: vector:2407
template<class _Alloc >
void vector< _Bool, _Alloc >::swap ( _Myt _Right)
inline
2864  { // exchange contents with right
2865  if (this == &_Right)
2866  ; // same object, do nothing
2867  else if (this->get_allocator() == _Right.get_allocator())
2868  { // same allocator, swap control information
2869  this->_Swap_all(_Right);
2870  this->_Myvec.swap(_Right._Myvec);
2871  _STD swap(this->_Mysize, _Right._Mysize);
2872  }
2873 
2874  else if (_Alty::propagate_on_container_swap::value)
2875  { // swap allocators and control information
2876  this->_Swap_alloc(_Right);
2877  this->_Myvec.swap(_Right._Myvec);
2878  _STD swap(this->_Mysize, _Right._Mysize);
2879  }
2880 
2881  else
2882  { // containers are incompatible
2883  #if _ITERATOR_DEBUG_LEVEL == 2
2884  _DEBUG_ERROR("vector<bool> containers incompatible for swap");
2885 
2886  #else /* ITERATOR_DEBUG_LEVEL == 2 */
2887  _XSTD terminate();
2888  #endif /* ITERATOR_DEBUG_LEVEL == 2 */
2889  }
2890  }
void swap(_Myt &_Right)
Definition: vector:2863
_Alty::size_type _Mysize
Definition: vector:2407
void __CRTDECL terminate()
Definition: exception:303
void _Swap_all(_Container_base0 &)
Definition: xutility:46
#define _XSTD
Definition: xstddef:20
_Vectype _Myvec
Definition: vector:2406
void _Swap_alloc(_Vb_val &)
Definition: vector:2363
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Ty & _Right
Definition: algorithm:4087
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:2685
template<class _Alloc >
static void vector< _Bool, _Alloc >::swap ( reference  _Left,
reference  _Right 
)
inlinestatic
2893  { // swap _Left and _Right vector<bool> elements
2894  bool _Val = _Left; // NOT _STD swap
2895 
2896  _Left = _Right;
2897  _Right = _Val;
2898  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
const _Ty & _Right
Definition: algorithm:4087

Member Data Documentation

template<class _Alloc >
const int vector< _Bool, _Alloc >::_VBITS = _STD _VBITS
static

The documentation for this class was generated from the following file: