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 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 vector< _Vbase, _Alloc > _Vectype
 
typedef _Vector_alloc< _Vec_base_types< _Vbase, _Alloc > >::_Alty _Alty
 
typedef _Alty::size_type size_type
 

Public Member Functions

 vector () _NOEXCEPT_OP(is_nothrow_default_constructible< _Alloc >
 
 vector (const _Alloc &_Al) _NOEXCEPT
 
 vector (_CRT_GUARDOVERFLOW size_type _Count, const _Alloc &_Al=_Alloc())
 
 vector (_CRT_GUARDOVERFLOW size_type _Count, const bool &_Val, const _Alloc &_Al=_Alloc())
 
 vector (const _Myt &_Right)
 
 vector (const _Myt &_Right, const _Alloc &_Al)
 
template<class _Iter , class = enable_if_t<_Is_iterator<_Iter>::value>>
 vector (_Iter _First, _Iter _Last, const _Alloc &_Al=_Alloc())
 
template<class _Iter >
void _BConstruct (_Iter _First, _Iter _Last)
 
 vector (_Myt &&_Right)
 
 vector (_Myt &&_Right, const _Alloc &_Al)
 
_Mytoperator= (_Myt &&_Right)
 
template<class... _Valty>
void emplace_back (_Valty &&..._Val)
 
template<class... _Valty>
iterator emplace (const_iterator _Where, _Valty &&..._Val)
 
 vector (initializer_list< bool > _Ilist, const _Alloc &_Al=allocator_type())
 
_Mytoperator= (initializer_list< bool > _Ilist)
 
void assign (initializer_list< bool > _Ilist)
 
iterator insert (const_iterator _Where, initializer_list< bool > _Ilist)
 
 ~vector () _NOEXCEPT
 
_Mytoperator= (const _Myt &_Right)
 
void reserve (_CRT_GUARDOVERFLOW 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 (_CRT_GUARDOVERFLOW 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_t< _Is_iterator< _Iter >::value, voidassign (_Iter _First, _Iter _Last)
 
void assign (_CRT_GUARDOVERFLOW size_type _Count, const bool &_Val)
 
iterator insert (const_iterator _Where, const bool &_Val)
 
iterator insert (const_iterator _Where, _CRT_GUARDOVERFLOW size_type _Count, const bool &_Val)
 
template<class _Iter >
enable_if_t< _Is_iterator< _Iter >::value, iteratorinsert (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)
 
void _Xlen () const
 
void _Xran () const
 
- Public Member Functions inherited from _Vb_val< _Alloc >
 _Vb_val (size_type _Count, const bool &_Val)
 
 _Vb_val (size_type _Count, const bool &_Val, const _Alloc &_Al)
 
 _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 _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 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 
2651 {_EEN_VBITS = _VBITS}; // helper for expression evaluator
Definition: vector:2651
static const int _VBITS
Definition: vector:2650

Constructor & Destructor Documentation

template<class _Alloc >
vector< bool, _Alloc >::vector ( )
inline
2654  : _Mybase(0, false)
2655  { // construct empty vector
2656  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Alloc &  _Al)
inlineexplicit
2659  : _Mybase(0, false, _Al)
2660  { // construct empty vector, allocator
2661  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
template<class _Alloc >
vector< bool, _Alloc >::vector ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Alloc &  _Al = _Alloc() 
)
inlineexplicit
2664  : _Mybase(_Count, false, _Al)
2665  { // construct from _Count * false, optional allocator
2666  _Trim(_Count);
2667  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
void _Trim(size_type _Size)
Definition: vector:3216
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
vector< bool, _Alloc >::vector ( _CRT_GUARDOVERFLOW size_type  _Count,
const bool _Val,
const _Alloc &  _Al = _Alloc() 
)
inline
2670  : _Mybase(_Count, _Val, _Al)
2671  { // construct from _Count * _Val, optional allocator
2672  _Trim(_Count);
2673  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
void _Trim(size_type _Size)
Definition: vector:3216
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Myt _Right)
inline
2676  : _Mybase(_Right)
2677  { // construct by copying _Right
2678  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Myt _Right,
const _Alloc &  _Al 
)
inline
2681  : _Mybase(_Right, _Al)
2682  { // construct by copying _Right, allocator
2683  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
template<class _Iter , class = enable_if_t<_Is_iterator<_Iter>::value>>
vector< bool, _Alloc >::vector ( _Iter  _First,
_Iter  _Last,
const _Alloc &  _Al = _Alloc() 
)
inline
2688  : _Mybase(0, false, _Al)
2689  { // construct from [_First, _Last), optional allocator
2690  _BConstruct(_First, _Last);
2691  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
_FwdIt _Last
Definition: algorithm:1936
void _BConstruct(_Iter _First, _Iter _Last)
Definition: vector:2694
template<class _Alloc >
vector< bool, _Alloc >::vector ( _Myt &&  _Right)
inline
2700  : _Mybase(_STD move(_Right))
2701  { // move construct by moving _Right
2702  this->_Swap_all(_Right);
2703  }
void _Swap_all(_Container_base0 &)
Definition: xutility:66
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
vector< bool, _Alloc >::vector ( _Myt &&  _Right,
const _Alloc &  _Al 
)
inline
2706  : _Mybase(_STD move(_Right), _Al)
2707  { // move construct by moving _Right, allocator
2708  if (this->_Myvec._Getal() == _Right._Myvec._Getal())
2709  {
2710  this->_Swap_all(_Right);
2711  }
2712  }
void _Swap_all(_Container_base0 &)
Definition: xutility:66
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
_Vectype _Myvec
Definition: vector:2616
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_Alty & _Getal() _NOEXCEPT
Definition: vector:629
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
vector< bool, _Alloc >::vector ( initializer_list< bool _Ilist,
const _Alloc &  _Al = allocator_type() 
)
inline
2762  : _Mybase(0, false, _Al)
2763  { // construct from initializer_list
2764  insert(begin(), _Ilist.begin(), _Ilist.end());
2765  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
_Vb_val< _Alloc > _Mybase
Definition: vector:2628
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
vector< bool, _Alloc >::~vector ( )
inline
2785  { // destroy the object
2786  }

Member Function Documentation

template<class _Alloc >
template<class _Iter >
void vector< bool, _Alloc >::_BConstruct ( _Iter  _First,
_Iter  _Last 
)
inline
2695  { // initialize from [_First, _Last), input iterators
2696  insert(begin(), _First, _Last);
2697  }
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
iterator begin() _NOEXCEPT
Definition: vector:2825
_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
3037  { // insert [_First, _Last) at _Where, input iterators
3038  size_type _Off = _Where - begin();
3039 
3040  for (; _First != _Last; ++_First, (void)++_Off)
3041  insert(begin() + _Off, *_First);
3042  }
_Alty::size_type size_type
Definition: vector:2632
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
iterator begin() _NOEXCEPT
Definition: vector:2825
_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
3048  { // insert [_First, _Last) at _Where, forward iterators
3049  _DEBUG_RANGE(_First, _Last);
3050  size_type _Count = _STD distance(_First, _Last);
3051  size_type _Off = _Insert_x(_Where, _Count);
3052  _STD copy(_First, _Last, begin() + _Off);
3053  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2347
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
_Alty::size_type size_type
Definition: vector:2632
_Iter_diff_t< _InIt > distance(_InIt _First, _InIt _Last)
Definition: xutility:1111
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:3150
_Diff _Count
Definition: algorithm:1941
iterator begin() _NOEXCEPT
Definition: vector:2825
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
iterator vector< bool, _Alloc >::_Insert_n ( const_iterator  _Where,
size_type  _Count,
const bool _Val 
)
inline
3144  { // insert _Count * _Val at _Where
3145  size_type _Off = _Insert_x(_Where, _Count);
3146  _STD fill(begin() + _Off, begin() + (_Off + _Count), _Val);
3147  return (begin() + _Off);
3148  }
_Alty::size_type size_type
Definition: vector:2632
void fill(_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
Definition: xutility:2709
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:3150
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
size_type vector< bool, _Alloc >::_Insert_x ( const_iterator  _Where,
size_type  _Count 
)
inline
3151  { // make room to insert _Count elements at _Where
3152  size_type _Off = _Where - begin();
3153 
3154  #if _ITERATOR_DEBUG_LEVEL == 2
3155  if (end() < _Where)
3156  {
3157  _DEBUG_ERROR("vector<bool> insert iterator outside range");
3158  }
3159 
3160  bool _Realloc = capacity() - size() < _Count;
3161  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
3162 
3163  if (_Count == 0)
3164  ;
3165  else if (max_size() - size() < _Count)
3166  _Xlen(); // result too long
3167  else
3168  { // worth doing
3169  this->_Myvec.resize(this->_Nw(size() + _Count), 0);
3170  if (empty())
3171  this->_Mysize += _Count;
3172  else
3173  { // make room and copy down suffix
3174  iterator _Oldend = end();
3175  this->_Mysize += _Count;
3176  _STD copy_backward(begin() + _Off, _Oldend, end());
3177  }
3178 
3179  #if _ITERATOR_DEBUG_LEVEL == 2
3180  _Orphan_range(_Realloc ? 0 : _Off, this->_Mysize);
3181  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
3182  }
3183  return (_Off);
3184  }
void _Orphan_range(size_type, size_type) const
Definition: vector:3211
_Alty::size_type size_type
Definition: vector:2632
_Alty::size_type _Mysize
Definition: vector:2617
Definition: xutility:565
static size_type _Nw(size_type _Count)
Definition: vector:2611
void _Xlen() const
Definition: vector:3231
_BidIt2 copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
Definition: xutility:2515
_Vectype _Myvec
Definition: vector:2616
iterator end() _NOEXCEPT
Definition: vector:2835
void resize(_CRT_GUARDOVERFLOW const size_type _Newsize)
Definition: vector:1489
bool empty() const _NOEXCEPT
Definition: vector:2928
size_type size() const _NOEXCEPT
Definition: vector:2916
size_type capacity() const _NOEXCEPT
Definition: vector:2820
_Diff _Count
Definition: algorithm:1941
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
iterator begin() _NOEXCEPT
Definition: vector:2825
size_type max_size() const _NOEXCEPT
Definition: vector:2921
template<class _Alloc >
iterator vector< bool, _Alloc >::_Make_iter ( const_iterator  _Where)
inline
2881  { // make iterator from const_iterator
2882  iterator _Tmp = begin();
2883  if (0 < this->_Mysize)
2884  _Tmp += _Where - begin();
2885  return (_Tmp);
2886  }
_Alty::size_type _Mysize
Definition: vector:2617
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
void vector< bool, _Alloc >::_Orphan_range ( size_type  ,
size_type   
) const
inline
3212  { // orphan iterators within specified (inclusive) range
3213  }
template<class _Alloc >
void vector< bool, _Alloc >::_Trim ( size_type  _Size)
inline
3217  { // trim base vector to exact length in bits
3218  if (max_size() < _Size)
3219  _Xlen(); // result too long
3220  size_type _Words = this->_Nw(_Size);
3221 
3222  if (_Words < this->_Myvec.size())
3223  this->_Myvec.erase(this->_Myvec.begin() + _Words,
3224  this->_Myvec.end());
3225  this->_Mysize = _Size;
3226  _Size %= _VBITS;
3227  if (0 < _Size)
3228  this->_Myvec[_Words - 1] &= ((_Vbase)(1) << _Size) - 1;
3229  }
_Alty::size_type size_type
Definition: vector:2632
unsigned int _Vbase
Definition: vector:2062
_Alty::size_type _Mysize
Definition: vector:2617
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
static const int _VBITS
Definition: vector:2650
static size_type _Nw(size_type _Count)
Definition: vector:2611
void _Xlen() const
Definition: vector:3231
_Vectype _Myvec
Definition: vector:2616
size_type size() const _NOEXCEPT
Definition: vector:1708
return * this
Definition: variant:950
iterator end() _NOEXCEPT
Definition: vector:1653
iterator erase(const_iterator _Where)
Definition: vector:1570
size_type max_size() const _NOEXCEPT
Definition: vector:2921
template<class _Alloc >
void vector< bool, _Alloc >::_Xlen ( ) const
inline
3232  { // report a length_error
3233  _Xlength_error("vector<bool> too long");
3234  }
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xlength_error(_In_z_ const char *)
template<class _Alloc >
void vector< bool, _Alloc >::_Xran ( ) const
inline
3237  { // report an out_of_range error
3238  _Xout_of_range("invalid vector<bool> subscript");
3239  }
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xout_of_range(_In_z_ const char *)
template<class _Alloc >
void vector< bool, _Alloc >::assign ( initializer_list< bool _Ilist)
inline
2774  { // assign initializer_list
2775  assign(_Ilist.begin(), _Ilist.end());
2776  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
void assign(initializer_list< bool > _Ilist)
Definition: vector:2773
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Alloc >
template<class _Iter >
enable_if_t<_Is_iterator<_Iter>::value, void> vector< bool, _Alloc >::assign ( _Iter  _First,
_Iter  _Last 
)
inline
3001  { // assign [_First, _Last), input iterators
3002  erase(begin(), end());
3003  insert(begin(), _First, _Last);
3004  }
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
iterator end() _NOEXCEPT
Definition: vector:2835
iterator erase(const_iterator _Where_arg)
Definition: vector:3055
iterator begin() _NOEXCEPT
Definition: vector:2825
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< bool, _Alloc >::assign ( _CRT_GUARDOVERFLOW size_type  _Count,
const bool _Val 
)
inline
3007  { // assign _Count * _Val
3008  erase(begin(), end());
3009  _Insert_n(begin(), _Count, _Val);
3010  }
iterator end() _NOEXCEPT
Definition: vector:2835
iterator erase(const_iterator _Where_arg)
Definition: vector:3055
_Diff _Count
Definition: algorithm:1941
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:3142
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_reference vector< bool, _Alloc >::at ( size_type  _Off) const
inline
2940  { // subscript nonmutable sequence with checking
2941  if (size() <= _Off)
2942  _Xran();
2943  return ((*this)[_Off]);
2944  }
void _Xran() const
Definition: vector:3236
size_type size() const _NOEXCEPT
Definition: vector:2916
template<class _Alloc >
reference vector< bool, _Alloc >::at ( size_type  _Off)
inline
2947  { // subscript mutable sequence with checking
2948  if (size() <= _Off)
2949  _Xran();
2950  return ((*this)[_Off]);
2951  }
void _Xran() const
Definition: vector:3236
size_type size() const _NOEXCEPT
Definition: vector:2916
template<class _Alloc >
reference vector< bool, _Alloc >::back ( )
inline
2978  { // return last element of mutable sequence
2979  return (*(end() - 1));
2980  }
iterator end() _NOEXCEPT
Definition: vector:2835
template<class _Alloc >
const_reference vector< bool, _Alloc >::back ( ) const
inline
2983  { // return last element of nonmutable sequence
2984  return (*(end() - 1));
2985  }
iterator end() _NOEXCEPT
Definition: vector:2835
template<class _Alloc >
iterator vector< bool, _Alloc >::begin ( )
inline
2826  { // return iterator for beginning of mutable sequence
2827  return (iterator(this->_Myvec.data(), this));
2828  }
_Vb_iterator< _Alty > iterator
Definition: vector:2643
_Ty * data() _NOEXCEPT
Definition: vector:1633
_Vectype _Myvec
Definition: vector:2616
template<class _Alloc >
const_iterator vector< bool, _Alloc >::begin ( ) const
inline
2831  { // return iterator for beginning of nonmutable sequence
2832  return (const_iterator(this->_Myvec.data(), this));
2833  }
_Ty * data() _NOEXCEPT
Definition: vector:1633
_Vectype _Myvec
Definition: vector:2616
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2642
template<class _Alloc >
size_type vector< bool, _Alloc >::capacity ( ) const
inline
2821  { // return current length of allocated storage
2822  return (this->_Myvec.capacity() * _VBITS);
2823  }
static const int _VBITS
Definition: vector:2650
size_type capacity() const _NOEXCEPT
Definition: vector:1718
_Vectype _Myvec
Definition: vector:2616
template<class _Alloc >
const_iterator vector< bool, _Alloc >::cbegin ( ) const
inline
2852  { // return iterator for beginning of nonmutable sequence
2853  return (begin());
2854  }
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_iterator vector< bool, _Alloc >::cend ( ) const
inline
2857  { // return iterator for end of nonmutable sequence
2858  return (end());
2859  }
iterator end() _NOEXCEPT
Definition: vector:2835
template<class _Alloc >
void vector< bool, _Alloc >::clear ( )
inline
3106  { // erase all elements
3107  erase(begin(), end());
3108  }
iterator end() _NOEXCEPT
Definition: vector:2835
iterator erase(const_iterator _Where_arg)
Definition: vector:3055
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::crbegin ( ) const
inline
2862  { // return iterator for beginning of reversed nonmutable sequence
2863  return (rbegin());
2864  }
reverse_iterator rbegin() _NOEXCEPT
Definition: vector:2888
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::crend ( ) const
inline
2867  { // return iterator for end of reversed nonmutable sequence
2868  return (rend());
2869  }
reverse_iterator rend() _NOEXCEPT
Definition: vector:2898
template<class _Alloc >
template<class... _Valty>
iterator vector< bool, _Alloc >::emplace ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
2755  { // insert bool at _Where
2756  bool _Tmp(_STD forward<_Valty>(_Val)...);
2757  return (insert(_Where, _Tmp));
2758  }
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
template<class... _Valty>
void vector< bool, _Alloc >::emplace_back ( _Valty &&...  _Val)
inline
2748  { // insert bool at end
2749  bool _Tmp(_STD forward<_Valty>(_Val)...);
2750  push_back(_Tmp);
2751  }
void push_back(const bool &_Val)
Definition: vector:2987
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
bool vector< bool, _Alloc >::empty ( ) const
inline
2929  { // test if sequence is empty
2930  return (size() == 0);
2931  }
size_type size() const _NOEXCEPT
Definition: vector:2916
template<class _Alloc >
iterator vector< bool, _Alloc >::end ( )
inline
2836  { // return iterator for end of mutable sequence
2837  iterator _Tmp = begin();
2838  if (0 < this->_Mysize)
2839  _Tmp += this->_Mysize;
2840  return (_Tmp);
2841  }
_Alty::size_type _Mysize
Definition: vector:2617
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_iterator vector< bool, _Alloc >::end ( ) const
inline
2844  { // return iterator for end of nonmutable sequence
2845  const_iterator _Tmp = begin();
2846  if (0 < this->_Mysize)
2847  _Tmp += this->_Mysize;
2848  return (_Tmp);
2849  }
_Alty::size_type _Mysize
Definition: vector:2617
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2642
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
iterator vector< bool, _Alloc >::erase ( const_iterator  _Where_arg)
inline
3056  { // erase element at _Where
3057  iterator _Where = _Make_iter(_Where_arg);
3058  size_type _Off = _Where - begin();
3059 
3060  #if _ITERATOR_DEBUG_LEVEL == 2
3061  if (end() <= _Where)
3062  {
3063  _DEBUG_ERROR("vector<bool> erase iterator outside range");
3064  }
3065 
3066  _STD copy(_Where + 1, end(), _Where);
3067  _Orphan_range(_Off, this->_Mysize);
3068 
3069  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
3070  _STD copy(_Where + 1, end(), _Where);
3071  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
3072 
3073  _Trim(this->_Mysize - 1);
3074  return (begin() + _Off);
3075  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2347
void _Orphan_range(size_type, size_type) const
Definition: vector:3211
_Alty::size_type size_type
Definition: vector:2632
_Alty::size_type _Mysize
Definition: vector:2617
Definition: xutility:565
iterator _Make_iter(const_iterator _Where)
Definition: vector:2880
void _Trim(size_type _Size)
Definition: vector:3216
iterator end() _NOEXCEPT
Definition: vector:2835
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
iterator vector< bool, _Alloc >::erase ( const_iterator  _First_arg,
const_iterator  _Last_arg 
)
inline
3079  { // erase [_First, _Last)
3080  iterator _First = _Make_iter(_First_arg);
3081  iterator _Last = _Make_iter(_Last_arg);
3082  size_type _Off = _First - begin();
3083 
3084  if (_First != _Last)
3085  { // worth doing, copy down over hole
3086  #if _ITERATOR_DEBUG_LEVEL == 2
3087  if (_Last < _First || end() < _Last)
3088  {
3089  _DEBUG_ERROR("vector<bool> erase iterator outside range");
3090  }
3091 
3092  iterator _Next = _STD copy(_Last, end(), _First);
3093  size_type _Newsize = _Next - begin();
3094  _Orphan_range(_Newsize, this->_Mysize);
3095  _Trim(_Newsize);
3096 
3097  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
3098  iterator _Next = _STD copy(_Last, end(), _First);
3099  _Trim(_Next - begin());
3100  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
3101  }
3102  return (begin() + _Off);
3103  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2347
void _Orphan_range(size_type, size_type) const
Definition: vector:3211
_Alty::size_type size_type
Definition: vector:2632
_Alty::size_type _Mysize
Definition: vector:2617
Definition: xutility:565
iterator _Make_iter(const_iterator _Where)
Definition: vector:2880
void _Trim(size_type _Size)
Definition: vector:3216
iterator end() _NOEXCEPT
Definition: vector:2835
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
iterator begin() _NOEXCEPT
Definition: vector:2825
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< bool, _Alloc >::flip ( )
inline
3111  { // toggle all elements
3112  for (typename _Vectype::iterator _Next = this->_Myvec.begin();
3113  _Next != this->_Myvec.end(); ++_Next)
3114  *_Next = (_Vbase)~*_Next;
3115  _Trim(this->_Mysize);
3116  }
unsigned int _Vbase
Definition: vector:2062
_Alty::size_type _Mysize
Definition: vector:2617
iterator begin() _NOEXCEPT
Definition: vector:1643
_Vectype _Myvec
Definition: vector:2616
void _Trim(size_type _Size)
Definition: vector:3216
iterator end() _NOEXCEPT
Definition: vector:1653
template<class _Alloc >
reference vector< bool, _Alloc >::front ( )
inline
2968  { // return first element of mutable sequence
2969  return (*begin());
2970  }
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_reference vector< bool, _Alloc >::front ( ) const
inline
2973  { // return first element of nonmutable sequence
2974  return (*begin());
2975  }
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
_Alloc vector< bool, _Alloc >::get_allocator ( ) const
inline
2934  { // return allocator object for values
2935  _Alloc _Ret(this->_Myvec.get_allocator());
2936  return (_Ret);
2937  }
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:1839
_Vectype _Myvec
Definition: vector:2616
template<class _Alloc >
size_t vector< bool, _Alloc >::hash ( ) const
inline
3137  { // hash bits to size_t value by pseudorandomizing transform
3138  return (_Hash_seq((const unsigned char *)this->_Myvec.data(),
3139  this->_Myvec.size() * sizeof (_Vbase)));
3140  }
unsigned int _Vbase
Definition: vector:2062
_STD_BEGIN size_t _Hash_seq(const unsigned char *_First, size_t _Count)
Definition: xstddef:330
_Ty * data() _NOEXCEPT
Definition: vector:1633
_Vectype _Myvec
Definition: vector:2616
size_type size() const _NOEXCEPT
Definition: vector:1708
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
initializer_list< bool _Ilist 
)
inline
2780  { // insert initializer_list
2781  return (insert(_Where, _Ilist.begin(), _Ilist.end()));
2782  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
const bool _Val 
)
inline
3013  { // insert _Val at _Where
3014  return (_Insert_n(_Where, (size_type)1, _Val));
3015  }
_Alty::size_type size_type
Definition: vector:2632
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:3142
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
_CRT_GUARDOVERFLOW size_type  _Count,
const bool _Val 
)
inline
3019  { // insert _Count * _Val at _Where
3020  return (_Insert_n(_Where, _Count, _Val));
3021  }
_Diff _Count
Definition: algorithm:1941
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:3142
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
template<class _Iter >
enable_if_t<_Is_iterator<_Iter>::value, iterator> vector< bool, _Alloc >::insert ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last 
)
inline
3027  { // insert [_First, _Last) at _Where
3028  size_type _Off = _Where - begin();
3029  _Insert(_Where, _First, _Last, _Iter_cat_t<_Iter>());
3030  return (begin() + _Off);
3031  }
_Alty::size_type size_type
Definition: vector:2632
typename iterator_traits< _Iter >::iterator_category _Iter_cat_t
Definition: xutility:657
void _Insert(const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: vector:3034
iterator begin() _NOEXCEPT
Definition: vector:2825
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
size_type vector< bool, _Alloc >::max_size ( ) const
inline
2922  { // return maximum possible length of sequence
2923  const size_type _Maxsize = this->_Myvec.max_size();
2924  return (_Maxsize < (size_type)(-1) / _VBITS
2925  ? _Maxsize * _VBITS : (size_type)(-1));
2926  }
_Alty::size_type size_type
Definition: vector:2632
static const int _VBITS
Definition: vector:2650
_Vectype _Myvec
Definition: vector:2616
size_type max_size() const _NOEXCEPT
Definition: vector:1713
_In_ size_t _Maxsize
Definition: xlocinfo.h:144
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( _Myt &&  _Right)
inline
2715  { // assign by moving _Right
2716  if (this != _STD addressof(_Right))
2717  { // different, assign it
2718  clear();
2719 
2720  const bool _Reload = _Alty::propagate_on_container_move_assignment::value
2721  && this->_Myvec._Getal() != _Right._Myvec._Getal();
2722 
2723  if (_Reload)
2724  {
2725  this->_Free_proxy();
2726  }
2727 
2728  this->_Myvec = _STD move(_Right._Myvec);
2729 
2730  if (_Reload)
2731  {
2732  this->_Alloc_proxy();
2733  }
2734 
2735  this->_Mysize = _Right._Mysize;
2736  _Right._Mysize = 0;
2737 
2738  if (this->_Myvec._Getal() == _Right._Myvec._Getal())
2739  {
2740  this->_Swap_all(_Right);
2741  }
2742  }
2743  return (*this);
2744  }
void _Free_proxy()
Definition: vector:2586
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Alty::size_type _Mysize
Definition: vector:2617
void _Swap_all(_Container_base0 &)
Definition: xutility:66
void _Alloc_proxy()
Definition: vector:2582
_Vectype _Myvec
Definition: vector:2616
void clear() _NOEXCEPT
Definition: vector:3105
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_Alty & _Getal() _NOEXCEPT
Definition: vector:629
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( initializer_list< bool _Ilist)
inline
2768  { // assign initializer_list
2769  assign(_Ilist.begin(), _Ilist.end());
2770  return (*this);
2771  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
void assign(initializer_list< bool > _Ilist)
Definition: vector:2773
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( const _Myt _Right)
inline
2789  { // assign from _Right
2790  if (this != _STD addressof(_Right))
2791  { // different, assign it
2792  this->_Orphan_all();
2793 
2794  const bool _Reload = _Alty::propagate_on_container_copy_assignment::value
2795  && this->_Myvec._Getal() != _Right._Myvec._Getal();
2796 
2797  if (_Reload)
2798  {
2799  this->_Free_proxy();
2800  }
2801 
2802  this->_Myvec = _Right._Myvec;
2803 
2804  if (_Reload)
2805  {
2806  this->_Alloc_proxy();
2807  }
2808 
2809  this->_Mysize = _Right._Mysize;
2810  }
2811 
2812  return (*this);
2813  }
void _Free_proxy()
Definition: vector:2586
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Orphan_all()
Definition: xutility:62
_Alty::size_type _Mysize
Definition: vector:2617
void _Alloc_proxy()
Definition: vector:2582
_Vectype _Myvec
Definition: vector:2616
_Alty & _Getal() _NOEXCEPT
Definition: vector:629
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
const_reference vector< bool, _Alloc >::operator[] ( size_type  _Off) const
inline
2954  { // subscript nonmutable sequence
2955  const_iterator _It = begin();
2956  _It._Advance(_Off);
2957  return (*_It);
2958  }
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2642
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
reference vector< bool, _Alloc >::operator[] ( size_type  _Off)
inline
2961  { // subscript mutable sequence
2962  iterator _It = begin();
2963  _It._Advance(_Off);
2964  return (*_It);
2965  }
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
void vector< bool, _Alloc >::pop_back ( )
inline
2993  { // erase element at end
2994  erase(end() - 1);
2995  }
iterator end() _NOEXCEPT
Definition: vector:2835
iterator erase(const_iterator _Where_arg)
Definition: vector:3055
template<class _Alloc >
void vector< bool, _Alloc >::push_back ( const bool _Val)
inline
2988  { // insert element at end
2989  insert(end(), _Val);
2990  }
iterator insert(const_iterator _Where, initializer_list< bool > _Ilist)
Definition: vector:2778
iterator end() _NOEXCEPT
Definition: vector:2835
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Alloc >
reverse_iterator vector< bool, _Alloc >::rbegin ( )
inline
2889  { // return iterator for beginning of reversed mutable sequence
2890  return (reverse_iterator(end()));
2891  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2647
iterator end() _NOEXCEPT
Definition: vector:2835
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::rbegin ( ) const
inline
2894  { // return iterator for beginning of reversed nonmutable sequence
2895  return (const_reverse_iterator(end()));
2896  }
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2648
iterator end() _NOEXCEPT
Definition: vector:2835
template<class _Alloc >
reverse_iterator vector< bool, _Alloc >::rend ( )
inline
2899  { // return iterator for end of reversed mutable sequence
2900  return (reverse_iterator(begin()));
2901  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2647
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::rend ( ) const
inline
2904  { // return iterator for end of reversed nonmutable sequence
2905  return (const_reverse_iterator(begin()));
2906  }
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2648
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
void vector< bool, _Alloc >::reserve ( _CRT_GUARDOVERFLOW size_type  _Count)
inline
2816  { // determine new minimum length of allocated storage
2817  this->_Myvec.reserve(this->_Nw(_Count));
2818  }
void reserve(_CRT_GUARDOVERFLOW const size_type _Newcapacity)
Definition: vector:1527
static size_type _Nw(size_type _Count)
Definition: vector:2611
_Vectype _Myvec
Definition: vector:2616
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
void vector< bool, _Alloc >::resize ( _CRT_GUARDOVERFLOW size_type  _Newsize,
bool  _Val = false 
)
inline
2909  { // determine new length, padding with _Val elements as needed
2910  if (size() < _Newsize)
2911  _Insert_n(end(), _Newsize - size(), _Val);
2912  else if (_Newsize < size())
2913  erase(begin() + _Newsize, end());
2914  }
iterator end() _NOEXCEPT
Definition: vector:2835
iterator erase(const_iterator _Where_arg)
Definition: vector:3055
size_type size() const _NOEXCEPT
Definition: vector:2916
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:3142
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator begin() _NOEXCEPT
Definition: vector:2825
template<class _Alloc >
void vector< bool, _Alloc >::shrink_to_fit ( )
inline
2872  { // reduce capacity
2873  if (this->_Myvec.capacity() != this->_Myvec.size())
2874  { // worth shrinking, do it
2875  this->_Orphan_all();
2876  this->_Myvec.shrink_to_fit();
2877  }
2878  }
void _Orphan_all()
Definition: xutility:62
void shrink_to_fit()
Definition: vector:1540
size_type capacity() const _NOEXCEPT
Definition: vector:1718
_Vectype _Myvec
Definition: vector:2616
size_type size() const _NOEXCEPT
Definition: vector:1708
template<class _Alloc >
size_type vector< bool, _Alloc >::size ( ) const
inline
2917  { // return length of sequence
2918  return (this->_Mysize);
2919  }
_Alty::size_type _Mysize
Definition: vector:2617
template<class _Alloc >
void vector< bool, _Alloc >::swap ( _Myt _Right)
inline
3119  { // exchange contents with _Right
3120  if (this != _STD addressof(_Right))
3121  { // (maybe) swap allocators, swap control information
3122  this->_Swap_all(_Right);
3123  this->_Myvec.swap(_Right._Myvec);
3124  _STD swap(this->_Mysize, _Right._Mysize);
3125  }
3126  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void swap(_Myt &_Right)
Definition: vector:3118
_Alty::size_type _Mysize
Definition: vector:2617
void _Swap_all(_Container_base0 &)
Definition: xutility:66
void swap(vector &_Right) _NOEXCEPT_OP(_Alty
Definition: vector:1620
_Vectype _Myvec
Definition: vector:2616
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Alloc >
static void vector< bool, _Alloc >::swap ( reference  _Left,
reference  _Right 
)
inlinestatic
3129  { // swap _Left and _Right vector<bool> elements
3130  bool _Val = _Left; // NOT _STD swap
3131 
3132  _Left = _Right;
3133  _Right = _Val;
3134  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
_FwdIt const _Ty _Val
Definition: algorithm:1938
constexpr const _Ty &() _Right
Definition: algorithm:3723

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: