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 _Vectype::_Alty _Alty
 
typedef _Alty::size_type size_type
 

Public Member Functions

 vector ()
 
 vector (const _Alloc &_Al)
 
 vector (size_type _Count, const _Alloc &_Al=_Alloc())
 
 vector (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 = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 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 (_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)
 
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 
2451 {_EEN_VBITS = _VBITS}; // helper for expression evaluator
Definition: vector:2451
static const int _VBITS
Definition: vector:2450

Constructor & Destructor Documentation

template<class _Alloc >
vector< bool, _Alloc >::vector ( )
inline
2453  : _Mybase(0, false)
2454  { // construct empty vector
2455  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Alloc &  _Al)
inlineexplicit
2458  : _Mybase(0, false, _Al)
2459  { // construct empty vector, allocator
2460  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
template<class _Alloc >
vector< bool, _Alloc >::vector ( size_type  _Count,
const _Alloc &  _Al = _Alloc() 
)
inlineexplicit
2463  : _Mybase(_Count, false, _Al)
2464  { // construct from _Count * false, optional allocator
2465  _Trim(_Count);
2466  }
unsigned int _Count
Definition: xcomplex:668
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
void _Trim(size_type _Size)
Definition: vector:2974
template<class _Alloc >
vector< bool, _Alloc >::vector ( size_type  _Count,
const bool _Val,
const _Alloc &  _Al = _Alloc() 
)
inline
2469  : _Mybase(_Count, _Val, _Al)
2470  { // construct from _Count * _Val, optional allocator
2471  _Trim(_Count);
2472  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
void _Trim(size_type _Size)
Definition: vector:2974
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Myt _Right)
inline
2475  : _Mybase(_Right)
2476  { // construct by copying _Right
2477  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
vector< bool, _Alloc >::vector ( const _Myt _Right,
const _Alloc &  _Al 
)
inline
2480  : _Mybase(_Right, _Al)
2481  { // construct by copying _Right, allocator
2482  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
constexpr const _Ty &() _Right
Definition: algorithm:3591
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 = _Alloc() 
)
inline
2488  : _Mybase(0, false, _Al)
2489  { // construct from [_First, _Last), optional allocator
2490  _BConstruct(_First, _Last);
2491  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
_FwdIt _Last
Definition: algorithm:1936
void _BConstruct(_Iter _First, _Iter _Last)
Definition: vector:2494
template<class _Alloc >
vector< bool, _Alloc >::vector ( _Myt &&  _Right)
inline
2500  : _Mybase(_STD forward<_Myt>(_Right))
2501  { // move construct by moving _Right
2502  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
vector< bool, _Alloc >::vector ( _Myt &&  _Right,
const _Alloc &  _Al 
)
inline
2505  : _Mybase(_STD forward<_Myt>(_Right), _Al)
2506  { // move construct by moving _Right, allocator
2507  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
vector< bool, _Alloc >::vector ( _XSTD initializer_list< bool _Ilist,
const _Alloc &  _Al = allocator_type() 
)
inline
2549  : _Mybase(0, false, _Al)
2550  { // construct from initializer_list
2551  insert(begin(), _Ilist.begin(), _Ilist.end());
2552  }
_Vb_val< _Alloc > _Mybase
Definition: vector:2428
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
vector< bool, _Alloc >::~vector ( )
inline
2572  { // destroy the object
2573  }

Member Function Documentation

template<class _Alloc >
template<class _Iter >
void vector< bool, _Alloc >::_BConstruct ( _Iter  _First,
_Iter  _Last 
)
inline
2495  { // initialize from [_First, _Last), input iterators
2496  insert(begin(), _First, _Last);
2497  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
iterator begin() _NOEXCEPT
Definition: vector:2592
_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
2804  { // insert [_First, _Last) at _Where, input iterators
2805  size_type _Off = _Where - begin();
2806 
2807  for (; _First != _Last; ++_First, (void)++_Off)
2808  insert(begin() + _Off, *_First);
2809  }
_Alty::size_type size_type
Definition: vector:2432
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
iterator begin() _NOEXCEPT
Definition: vector:2592
_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
2815  { // insert [_First, _Last) at _Where, forward iterators
2816  _DEBUG_RANGE(_First, _Last);
2817  size_type _Count = _STD distance(_First, _Last);
2818  size_type _Off = _Insert_x(_Where, _Count);
2819  _STD copy(_First, _Last, begin() + _Off);
2820  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2369
unsigned int _Count
Definition: xcomplex:668
#define _DEBUG_RANGE(first, last)
Definition: xutility:822
_Alty::size_type size_type
Definition: vector:2432
_Iter_diff_t< _InIt > distance(_InIt _First, _InIt _Last)
Definition: xutility:1124
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:2911
iterator begin() _NOEXCEPT
Definition: vector:2592
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
iterator vector< bool, _Alloc >::_Insert_n ( const_iterator  _Where,
size_type  _Count,
const bool _Val 
)
inline
2905  { // insert _Count * _Val at _Where
2906  size_type _Off = _Insert_x(_Where, _Count);
2907  _STD fill(begin() + _Off, begin() + (_Off + _Count), _Val);
2908  return (begin() + _Off);
2909  }
unsigned int _Count
Definition: xcomplex:668
_Alty::size_type size_type
Definition: vector:2432
_In_ int _Val
Definition: vcruntime_string.h:62
void fill(_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
Definition: xutility:2785
size_type _Insert_x(const_iterator _Where, size_type _Count)
Definition: vector:2911
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
size_type vector< bool, _Alloc >::_Insert_x ( const_iterator  _Where,
size_type  _Count 
)
inline
2912  { // make room to insert _Count elements at _Where
2913  size_type _Off = _Where - begin();
2914 
2915  #if _ITERATOR_DEBUG_LEVEL == 2
2916  if (end() < _Where)
2917  _DEBUG_ERROR("vector<bool> insert iterator outside range");
2918  bool _Realloc = capacity() - size() < _Count;
2919  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2920 
2921  if (_Count == 0)
2922  ;
2923  else if (max_size() - size() < _Count)
2924  _Xlen(); // result too long
2925  else
2926  { // worth doing
2927  this->_Myvec.resize(this->_Nw(size() + _Count), 0);
2928  if (empty())
2929  this->_Mysize += _Count;
2930  else
2931  { // make room and copy down suffix
2932  iterator _Oldend = end();
2933  this->_Mysize += _Count;
2934  _STD copy_backward(begin() + _Off, _Oldend, end());
2935  }
2936 
2937  #if _ITERATOR_DEBUG_LEVEL == 2
2938  _Orphan_range(_Realloc ? 0 : _Off, this->_Mysize);
2939  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2940  }
2941  return (_Off);
2942  }
void resize(size_type _Newsize)
Definition: vector:1132
void _Orphan_range(size_type, size_type) const
Definition: vector:2969
unsigned int _Count
Definition: xcomplex:668
_Alty::size_type size_type
Definition: vector:2432
_Alty::size_type _Mysize
Definition: vector:2417
Definition: xutility:563
static size_type _Nw(size_type _Count)
Definition: vector:2411
void _Xlen() const
Definition: vector:2989
_BidIt2 copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
Definition: xutility:2565
_Vectype _Myvec
Definition: vector:2416
iterator end() _NOEXCEPT
Definition: vector:2602
bool empty() const _NOEXCEPT
Definition: vector:2695
size_type size() const _NOEXCEPT
Definition: vector:2683
size_type capacity() const _NOEXCEPT
Definition: vector:2587
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
iterator begin() _NOEXCEPT
Definition: vector:2592
size_type max_size() const _NOEXCEPT
Definition: vector:2688
template<class _Alloc >
iterator vector< bool, _Alloc >::_Make_iter ( const_iterator  _Where)
inline
2648  { // make iterator from const_iterator
2649  iterator _Tmp = begin();
2650  if (0 < this->_Mysize)
2651  _Tmp += _Where - begin();
2652  return (_Tmp);
2653  }
_Alty::size_type _Mysize
Definition: vector:2417
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
void vector< bool, _Alloc >::_Orphan_range ( size_type  ,
size_type   
) const
inline
2970  { // orphan iterators within specified (inclusive) range
2971  }
template<class _Alloc >
void vector< bool, _Alloc >::_Trim ( size_type  _Size)
inline
2975  { // trim base vector to exact length in bits
2976  if (max_size() < _Size)
2977  _Xlen(); // result too long
2978  size_type _Words = this->_Nw(_Size);
2979 
2980  if (_Words < this->_Myvec.size())
2981  this->_Myvec.erase(this->_Myvec.begin() + _Words,
2982  this->_Myvec.end());
2983  this->_Mysize = _Size;
2984  _Size %= _VBITS;
2985  if (0 < _Size)
2986  this->_Myvec[_Words - 1] &= ((_Vbase)(1) << _Size) - 1;
2987  }
_Alty::size_type size_type
Definition: vector:2432
unsigned int _Vbase
Definition: vector:1861
_Alty::size_type _Mysize
Definition: vector:2417
static const int _VBITS
Definition: vector:2450
static size_type _Nw(size_type _Count)
Definition: vector:2411
void _Xlen() const
Definition: vector:2989
_Vectype _Myvec
Definition: vector:2416
size_type size() const _NOEXCEPT
Definition: vector:1178
iterator end() _NOEXCEPT
Definition: vector:1066
iterator erase(const_iterator _Where)
Definition: vector:1483
_Size
Definition: vcruntime_string.h:36
size_type max_size() const _NOEXCEPT
Definition: vector:2688
template<class _Alloc >
void vector< bool, _Alloc >::_Xlen ( ) const
inline
2990  { // report a length_error
2991  _Xlength_error("vector<bool> too long");
2992  }
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xlength_error(_In_z_ const char *)
template<class _Alloc >
void vector< bool, _Alloc >::_Xran ( ) const
inline
2995  { // report an out_of_range error
2996  _Xout_of_range("invalid vector<bool> subscript");
2997  }
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xout_of_range(_In_z_ const char *)
template<class _Alloc >
void vector< bool, _Alloc >::assign ( _XSTD initializer_list< bool _Ilist)
inline
2561  { // assign initializer_list
2562  assign(_Ilist.begin(), _Ilist.end());
2563  }
void assign(_XSTD initializer_list< bool > _Ilist)
Definition: vector:2560
template<class _Alloc >
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, void>::type vector< bool, _Alloc >::assign ( _Iter  _First,
_Iter  _Last 
)
inline
2768  { // assign [_First, _Last), input iterators
2769  erase(begin(), end());
2770  insert(begin(), _First, _Last);
2771  }
iterator end() _NOEXCEPT
Definition: vector:2602
iterator erase(const_iterator _Where_arg)
Definition: vector:2822
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
iterator begin() _NOEXCEPT
Definition: vector:2592
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< bool, _Alloc >::assign ( size_type  _Count,
const bool _Val 
)
inline
2774  { // assign _Count * _Val
2775  erase(begin(), end());
2776  _Insert_n(begin(), _Count, _Val);
2777  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
iterator end() _NOEXCEPT
Definition: vector:2602
iterator erase(const_iterator _Where_arg)
Definition: vector:2822
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2903
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_reference vector< bool, _Alloc >::at ( size_type  _Off) const
inline
2707  { // subscript nonmutable sequence with checking
2708  if (size() <= _Off)
2709  _Xran();
2710  return ((*this)[_Off]);
2711  }
void _Xran() const
Definition: vector:2994
size_type size() const _NOEXCEPT
Definition: vector:2683
template<class _Alloc >
reference vector< bool, _Alloc >::at ( size_type  _Off)
inline
2714  { // subscript mutable sequence with checking
2715  if (size() <= _Off)
2716  _Xran();
2717  return ((*this)[_Off]);
2718  }
void _Xran() const
Definition: vector:2994
size_type size() const _NOEXCEPT
Definition: vector:2683
template<class _Alloc >
reference vector< bool, _Alloc >::back ( )
inline
2745  { // return last element of mutable sequence
2746  return (*(end() - 1));
2747  }
iterator end() _NOEXCEPT
Definition: vector:2602
template<class _Alloc >
const_reference vector< bool, _Alloc >::back ( ) const
inline
2750  { // return last element of nonmutable sequence
2751  return (*(end() - 1));
2752  }
iterator end() _NOEXCEPT
Definition: vector:2602
template<class _Alloc >
iterator vector< bool, _Alloc >::begin ( )
inline
2593  { // return iterator for beginning of mutable sequence
2594  return (iterator(this->_Myvec.data(), this));
2595  }
_Vb_iterator< _Alty > iterator
Definition: vector:2443
_Ty * data() _NOEXCEPT
Definition: vector:1245
_Vectype _Myvec
Definition: vector:2416
template<class _Alloc >
const_iterator vector< bool, _Alloc >::begin ( ) const
inline
2598  { // return iterator for beginning of nonmutable sequence
2599  return (const_iterator(this->_Myvec.data(), this));
2600  }
_Ty * data() _NOEXCEPT
Definition: vector:1245
_Vectype _Myvec
Definition: vector:2416
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2442
template<class _Alloc >
size_type vector< bool, _Alloc >::capacity ( ) const
inline
2588  { // return current length of allocated storage
2589  return (this->_Myvec.capacity() * _VBITS);
2590  }
static const int _VBITS
Definition: vector:2450
size_type capacity() const _NOEXCEPT
Definition: vector:1041
_Vectype _Myvec
Definition: vector:2416
template<class _Alloc >
const_iterator vector< bool, _Alloc >::cbegin ( ) const
inline
2619  { // return iterator for beginning of nonmutable sequence
2620  return (begin());
2621  }
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_iterator vector< bool, _Alloc >::cend ( ) const
inline
2624  { // return iterator for end of nonmutable sequence
2625  return (end());
2626  }
iterator end() _NOEXCEPT
Definition: vector:2602
template<class _Alloc >
void vector< bool, _Alloc >::clear ( )
inline
2867  { // erase all elements
2868  erase(begin(), end());
2869  }
iterator end() _NOEXCEPT
Definition: vector:2602
iterator erase(const_iterator _Where_arg)
Definition: vector:2822
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::crbegin ( ) const
inline
2629  { // return iterator for beginning of reversed nonmutable sequence
2630  return (rbegin());
2631  }
reverse_iterator rbegin() _NOEXCEPT
Definition: vector:2655
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::crend ( ) const
inline
2634  { // return iterator for end of reversed nonmutable sequence
2635  return (rend());
2636  }
reverse_iterator rend() _NOEXCEPT
Definition: vector:2665
template<class _Alloc >
template<class... _Valty>
iterator vector< bool, _Alloc >::emplace ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
2541  { // insert bool at _Where
2542  bool _Tmp(_STD forward<_Valty>(_Val)...);
2543  return (insert(_Where, _Tmp));
2544  }
_In_ int _Val
Definition: vcruntime_string.h:62
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
template<class _Alloc >
template<class... _Valty>
void vector< bool, _Alloc >::emplace_back ( _Valty &&...  _Val)
inline
2534  { // insert bool at end
2535  bool _Tmp(_STD forward<_Valty>(_Val)...);
2536  push_back(_Tmp);
2537  }
void push_back(const bool &_Val)
Definition: vector:2754
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Alloc >
bool vector< bool, _Alloc >::empty ( ) const
inline
2696  { // test if sequence is empty
2697  return (size() == 0);
2698  }
size_type size() const _NOEXCEPT
Definition: vector:2683
template<class _Alloc >
iterator vector< bool, _Alloc >::end ( )
inline
2603  { // return iterator for end of mutable sequence
2604  iterator _Tmp = begin();
2605  if (0 < this->_Mysize)
2606  _Tmp += this->_Mysize;
2607  return (_Tmp);
2608  }
_Alty::size_type _Mysize
Definition: vector:2417
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_iterator vector< bool, _Alloc >::end ( ) const
inline
2611  { // return iterator for end of nonmutable sequence
2612  const_iterator _Tmp = begin();
2613  if (0 < this->_Mysize)
2614  _Tmp += this->_Mysize;
2615  return (_Tmp);
2616  }
_Alty::size_type _Mysize
Definition: vector:2417
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2442
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
iterator vector< bool, _Alloc >::erase ( const_iterator  _Where_arg)
inline
2823  { // erase element at _Where
2824  iterator _Where = _Make_iter(_Where_arg);
2825  size_type _Off = _Where - begin();
2826 
2827  #if _ITERATOR_DEBUG_LEVEL == 2
2828  if (end() <= _Where)
2829  _DEBUG_ERROR("vector<bool> erase iterator outside range");
2830  _STD copy(_Where + 1, end(), _Where);
2831  _Orphan_range(_Off, this->_Mysize);
2832 
2833  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
2834  _STD copy(_Where + 1, end(), _Where);
2835  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2836 
2837  _Trim(this->_Mysize - 1);
2838  return (begin() + _Off);
2839  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2369
void _Orphan_range(size_type, size_type) const
Definition: vector:2969
_Alty::size_type size_type
Definition: vector:2432
_Alty::size_type _Mysize
Definition: vector:2417
Definition: xutility:563
iterator _Make_iter(const_iterator _Where)
Definition: vector:2647
void _Trim(size_type _Size)
Definition: vector:2974
iterator end() _NOEXCEPT
Definition: vector:2602
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
iterator vector< bool, _Alloc >::erase ( const_iterator  _First_arg,
const_iterator  _Last_arg 
)
inline
2843  { // erase [_First, _Last)
2844  iterator _First = _Make_iter(_First_arg);
2845  iterator _Last = _Make_iter(_Last_arg);
2846  size_type _Off = _First - begin();
2847 
2848  if (_First != _Last)
2849  { // worth doing, copy down over hole
2850  #if _ITERATOR_DEBUG_LEVEL == 2
2851  if (_Last < _First || end() < _Last)
2852  _DEBUG_ERROR("vector<bool> erase iterator outside range");
2853  iterator _Next = _STD copy(_Last, end(), _First);
2854  size_type _Newsize = _Next - begin();
2855  _Orphan_range(_Newsize, this->_Mysize);
2856  _Trim(_Newsize);
2857 
2858  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
2859  iterator _Next = _STD copy(_Last, end(), _First);
2860  _Trim(_Next - begin());
2861  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
2862  }
2863  return (begin() + _Off);
2864  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2369
void _Orphan_range(size_type, size_type) const
Definition: vector:2969
_Alty::size_type size_type
Definition: vector:2432
_Alty::size_type _Mysize
Definition: vector:2417
Definition: xutility:563
iterator _Make_iter(const_iterator _Where)
Definition: vector:2647
void _Trim(size_type _Size)
Definition: vector:2974
iterator end() _NOEXCEPT
Definition: vector:2602
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
iterator begin() _NOEXCEPT
Definition: vector:2592
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
void vector< bool, _Alloc >::flip ( )
inline
2872  { // toggle all elements
2873  for (typename _Vectype::iterator _Next = this->_Myvec.begin();
2874  _Next != this->_Myvec.end(); ++_Next)
2875  *_Next = (_Vbase)~*_Next;
2876  _Trim(this->_Mysize);
2877  }
unsigned int _Vbase
Definition: vector:1861
_Alty::size_type _Mysize
Definition: vector:2417
iterator begin() _NOEXCEPT
Definition: vector:1056
_Vectype _Myvec
Definition: vector:2416
void _Trim(size_type _Size)
Definition: vector:2974
iterator end() _NOEXCEPT
Definition: vector:1066
template<class _Alloc >
reference vector< bool, _Alloc >::front ( )
inline
2735  { // return first element of mutable sequence
2736  return (*begin());
2737  }
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_reference vector< bool, _Alloc >::front ( ) const
inline
2740  { // return first element of nonmutable sequence
2741  return (*begin());
2742  }
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
_Alloc vector< bool, _Alloc >::get_allocator ( ) const
inline
2701  { // return allocator object for values
2702  _Alloc _Ret(this->_Myvec.get_allocator());
2703  return (_Ret);
2704  }
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:1193
_Vectype _Myvec
Definition: vector:2416
template<class _Alloc >
size_t vector< bool, _Alloc >::hash ( ) const
inline
2898  { // hash bits to size_t value by pseudorandomizing transform
2899  return (_Hash_seq((const unsigned char *)this->_Myvec.data(),
2900  this->_Myvec.size() * sizeof (_Vbase)));
2901  }
unsigned int _Vbase
Definition: vector:1861
_STD_BEGIN size_t _Hash_seq(const unsigned char *_First, size_t _Count)
Definition: xstddef:335
_Ty * data() _NOEXCEPT
Definition: vector:1245
_Vectype _Myvec
Definition: vector:2416
size_type size() const _NOEXCEPT
Definition: vector:1178
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
_XSTD initializer_list< bool _Ilist 
)
inline
2567  { // insert initializer_list
2568  return (insert(_Where, _Ilist.begin(), _Ilist.end()));
2569  }
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
const bool _Val 
)
inline
2780  { // insert _Val at _Where
2781  return (_Insert_n(_Where, (size_type)1, _Val));
2782  }
_Alty::size_type size_type
Definition: vector:2432
_In_ int _Val
Definition: vcruntime_string.h:62
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2903
template<class _Alloc >
iterator vector< bool, _Alloc >::insert ( const_iterator  _Where,
size_type  _Count,
const bool _Val 
)
inline
2786  { // insert _Count * _Val at _Where
2787  return (_Insert_n(_Where, _Count, _Val));
2788  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2903
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
2794  { // insert [_First, _Last) at _Where
2795  size_type _Off = _Where - begin();
2796  _Insert(_Where, _First, _Last, _Iter_cat_t<_Iter>());
2797  return (begin() + _Off);
2798  }
_Alty::size_type size_type
Definition: vector:2432
typename iterator_traits< _Iter >::iterator_category _Iter_cat_t
Definition: xutility:655
void _Insert(const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: vector:2801
iterator begin() _NOEXCEPT
Definition: vector:2592
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc >
size_type vector< bool, _Alloc >::max_size ( ) const
inline
2689  { // return maximum possible length of sequence
2690  const size_type _Maxsize = this->_Myvec.max_size();
2691  return (_Maxsize < (size_type)(-1) / _VBITS
2692  ? _Maxsize * _VBITS : (size_type)(-1));
2693  }
_Alty::size_type size_type
Definition: vector:2432
static const int _VBITS
Definition: vector:2450
_Vectype _Myvec
Definition: vector:2416
size_type max_size() const _NOEXCEPT
Definition: vector:1183
_In_ size_t _Maxsize
Definition: xlocinfo.h:145
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( _Myt &&  _Right)
inline
2510  { // assign by moving _Right
2511  if (this != &_Right)
2512  { // different, assign it
2513  clear();
2514 
2515  if (_Alty::propagate_on_container_move_assignment::value
2516  && this->get_allocator() != _Right.get_allocator())
2517  { // assign vector, dumping proxy
2518  this->_Free_proxy();
2519  this->_Myvec = _STD move(_Right._Myvec);
2520  this->_Alloc_proxy();
2521  }
2522  else
2523  this->_Myvec = _STD move(_Right._Myvec);
2524 
2525 
2526  this->_Mysize = _Right._Mysize;
2527  _Right._Mysize = 0;
2528  }
2529  return (*this);
2530  }
void _Free_proxy()
Definition: vector:2386
_Alloc get_allocator() const _NOEXCEPT
Definition: vector:2700
_Alty::size_type _Mysize
Definition: vector:2417
void _Alloc_proxy()
Definition: vector:2382
_Vectype _Myvec
Definition: vector:2416
void clear() _NOEXCEPT
Definition: vector:2866
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( _XSTD initializer_list< bool _Ilist)
inline
2555  { // assign initializer_list
2556  assign(_Ilist.begin(), _Ilist.end());
2557  return (*this);
2558  }
void assign(_XSTD initializer_list< bool > _Ilist)
Definition: vector:2560
template<class _Alloc >
_Myt& vector< bool, _Alloc >::operator= ( const _Myt _Right)
inline
2576  { // assign from _Right
2577  this->_Mysize = _Right._Mysize;
2578  this->_Myvec = _Right._Myvec;
2579  return (*this);
2580  }
_Alty::size_type _Mysize
Definition: vector:2417
_Vectype _Myvec
Definition: vector:2416
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
const_reference vector< bool, _Alloc >::operator[] ( size_type  _Off) const
inline
2721  { // subscript nonmutable sequence
2722  const_iterator _It = begin();
2723  _It._Advance(_Off);
2724  return (*_It);
2725  }
_Vb_const_iterator< _Alty > const_iterator
Definition: vector:2442
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
reference vector< bool, _Alloc >::operator[] ( size_type  _Off)
inline
2728  { // subscript mutable sequence
2729  iterator _It = begin();
2730  _It._Advance(_Off);
2731  return (*_It);
2732  }
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
void vector< bool, _Alloc >::pop_back ( )
inline
2760  { // erase element at end
2761  erase(end() - 1);
2762  }
iterator end() _NOEXCEPT
Definition: vector:2602
iterator erase(const_iterator _Where_arg)
Definition: vector:2822
template<class _Alloc >
void vector< bool, _Alloc >::push_back ( const bool _Val)
inline
2755  { // insert element at end
2756  insert(end(), _Val);
2757  }
_In_ int _Val
Definition: vcruntime_string.h:62
iterator end() _NOEXCEPT
Definition: vector:2602
iterator insert(const_iterator _Where, _XSTD initializer_list< bool > _Ilist)
Definition: vector:2565
template<class _Alloc >
reverse_iterator vector< bool, _Alloc >::rbegin ( )
inline
2656  { // return iterator for beginning of reversed mutable sequence
2657  return (reverse_iterator(end()));
2658  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2447
iterator end() _NOEXCEPT
Definition: vector:2602
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::rbegin ( ) const
inline
2661  { // return iterator for beginning of reversed nonmutable sequence
2662  return (const_reverse_iterator(end()));
2663  }
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2448
iterator end() _NOEXCEPT
Definition: vector:2602
template<class _Alloc >
reverse_iterator vector< bool, _Alloc >::rend ( )
inline
2666  { // return iterator for end of reversed mutable sequence
2667  return (reverse_iterator(begin()));
2668  }
_STD reverse_iterator< iterator > reverse_iterator
Definition: vector:2447
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
const_reverse_iterator vector< bool, _Alloc >::rend ( ) const
inline
2671  { // return iterator for end of reversed nonmutable sequence
2672  return (const_reverse_iterator(begin()));
2673  }
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: vector:2448
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
void vector< bool, _Alloc >::reserve ( size_type  _Count)
inline
2583  { // determine new minimum length of allocated storage
2584  this->_Myvec.reserve(this->_Nw(_Count));
2585  }
unsigned int _Count
Definition: xcomplex:668
void reserve(size_type _Count)
Definition: vector:1031
static size_type _Nw(size_type _Count)
Definition: vector:2411
_Vectype _Myvec
Definition: vector:2416
template<class _Alloc >
void vector< bool, _Alloc >::resize ( size_type  _Newsize,
bool  _Val = false 
)
inline
2676  { // determine new length, padding with _Val elements as needed
2677  if (size() < _Newsize)
2678  _Insert_n(end(), _Newsize - size(), _Val);
2679  else if (_Newsize < size())
2680  erase(begin() + _Newsize, end());
2681  }
_In_ int _Val
Definition: vcruntime_string.h:62
iterator end() _NOEXCEPT
Definition: vector:2602
iterator erase(const_iterator _Where_arg)
Definition: vector:2822
size_type size() const _NOEXCEPT
Definition: vector:2683
iterator _Insert_n(const_iterator _Where, size_type _Count, const bool &_Val)
Definition: vector:2903
iterator begin() _NOEXCEPT
Definition: vector:2592
template<class _Alloc >
void vector< bool, _Alloc >::shrink_to_fit ( )
inline
2639  { // reduce capacity
2640  if (this->_Myvec._Has_unused_capacity())
2641  { // worth shrinking, do it
2642  _Myt _Tmp(*this);
2643  swap(_Tmp);
2644  }
2645  }
void swap(_Myt &_Right)
Definition: vector:2879
vector< bool, _Alloc > _Myt
Definition: vector:2427
_Vectype _Myvec
Definition: vector:2416
size_type _Has_unused_capacity() const _NOEXCEPT
Definition: vector:1051
template<class _Alloc >
size_type vector< bool, _Alloc >::size ( ) const
inline
2684  { // return length of sequence
2685  return (this->_Mysize);
2686  }
_Alty::size_type _Mysize
Definition: vector:2417
template<class _Alloc >
void vector< bool, _Alloc >::swap ( _Myt _Right)
inline
2880  { // exchange contents with _Right
2881  if (this != &_Right)
2882  { // (maybe) swap allocators, swap control information
2883  this->_Swap_all(_Right);
2884  this->_Myvec.swap(_Right._Myvec);
2885  _STD swap(this->_Mysize, _Right._Mysize);
2886  }
2887  }
void swap(_Myt &_Right)
Definition: vector:2879
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: vector:1545
_Alty::size_type _Mysize
Definition: vector:2417
void _Swap_all(_Container_base0 &)
Definition: xutility:46
_Vectype _Myvec
Definition: vector:2416
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alloc >
static void vector< bool, _Alloc >::swap ( reference  _Left,
reference  _Right 
)
inlinestatic
2890  { // swap _Left and _Right vector<bool> elements
2891  bool _Val = _Left; // NOT _STD swap
2892 
2893  _Left = _Right;
2894  _Right = _Val;
2895  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
_In_ int _Val
Definition: vcruntime_string.h:62
constexpr const _Ty &() _Right
Definition: algorithm:3591

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: