30 #ifndef _STLP_INTERNAL_BVECTOR_H 31 #define _STLP_INTERNAL_BVECTOR_H 33 #ifndef _STLP_INTERNAL_VECTOR_H 37 #define _STLP_WORD_BIT (int(CHAR_BIT * sizeof(unsigned int))) 60 return *
this =
bool(__x);
86 bool __tmp = (
bool)__x;
126 #if defined(_MSC_VER) && _MSC_VER<=1401 && defined(MIPS) && defined(NDEBUG) 168 template <
class _Ref,
class _Ptr>
230 template <
class _Ref,
class _Ptr>
238 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 239 template <
class _Ref,
class _Ptr>
249 #if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES) 267 template <
class _Alloc>
282 #if !defined (_STLP_NO_MOVE_SEMANTIC) 287 src.get()._M_start._M_p = 0;
320 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_BOOL) && !defined (__SUNPRO_CC) 321 # define _STLP_VECBOOL_TEMPLATE 322 # define __BVEC_TMPL_HEADER template <class _Alloc> 324 # undef _STLP_VECBOOL_TEMPLATE 325 # ifdef _STLP_NO_BOOL 326 # define __BVEC_TMPL_HEADER 328 # define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL 330 # define _Alloc allocator<bool> 333 #if defined (_STLP_DEBUG) 334 # define vector _STLP_NON_DBG_NAME(vector) 338 # define __BVECTOR_QUALIFIED bit_vector 339 # define __BVECTOR bit_vector 341 # ifdef _STLP_VECBOOL_TEMPLATE 342 # define __BVECTOR_QUALIFIED vector<bool, _Alloc> 344 # define __BVECTOR_QUALIFIED vector<bool, allocator<bool> > 346 # if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS) 347 # define __BVECTOR __BVECTOR_QUALIFIED 349 # define __BVECTOR vector 353 #if !defined (_STLP_DEBUG) || defined (_STLP_NO_BOOL) 359 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_DEBUG) 380 #ifdef _STLP_VECBOOL_TEMPLATE 392 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(
__n);
397 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
409 this->_M_deallocate();
410 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
415 #if defined (_STLP_MEMBER_TEMPLATES) 416 template <
class _InputIterator>
417 void _M_initialize_range(_InputIterator __first, _InputIterator
__last,
421 this->_M_end_of_storage._M_data = 0;
422 for ( ; __first !=
__last; ++__first)
426 template <
class _ForwardIterator>
427 void _M_initialize_range(_ForwardIterator __first, _ForwardIterator
__last,
434 template <
class _InputIterator>
435 void _M_insert_range(
iterator __pos,
436 _InputIterator __first, _InputIterator
__last,
438 for ( ; __first !=
__last; ++__first) {
439 __pos =
insert(__pos, *__first);
444 template <
class _ForwardIterator>
445 void _M_insert_range(
iterator __position,
446 _ForwardIterator __first, _ForwardIterator
__last,
462 this->_M_deallocate();
463 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
479 return const_reverse_iterator(
end());
482 const_reverse_iterator
rend()
const {
483 return const_reverse_iterator(
begin());
520 fill(this->_M_start._M_p, (
__chunk_type*)(this->_M_end_of_storage._M_data), 0);
529 #if defined (_STLP_MEMBER_TEMPLATES) 530 template <
class _Integer>
531 void _M_initialize_dispatch(_Integer
__n, _Integer __x,
const __true_type&) {
533 fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0);
536 template <
class _InputIterator>
537 void _M_initialize_dispatch(_InputIterator __first, _InputIterator
__last,
541 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 543 template <
class _InputIterator>
547 _M_initialize_dispatch(__first,
__last, _Integral());
550 template <
class _InputIterator>
555 _M_initialize_dispatch(__first,
__last, _Integral());
574 #if !defined (_STLP_NO_MOVE_SEMANTIC) 582 if (&__x ==
this)
return *
this;
584 this->_M_deallocate();
599 fill(this->_M_start._M_p, (
__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
604 fill(this->_M_start._M_p, (
__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
609 #if defined (_STLP_MEMBER_TEMPLATES) 610 template <
class _InputIterator>
611 void assign(_InputIterator __first, _InputIterator
__last) {
613 _M_assign_dispatch(__first,
__last, _Integral());
616 template <
class _Integer>
620 template <
class _InputIter>
624 template <
class _InputIterator>
625 void _M_assign_aux(_InputIterator __first, _InputIterator
__last,
628 for ( ; __first !=
__last && __cur !=
end(); ++__cur, ++__first)
636 template <
class _ForwardIterator>
637 void _M_assign_aux(_ForwardIterator __first, _ForwardIterator
__last,
643 _ForwardIterator __mid = __first;
658 this->_M_deallocate();
660 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(
__n);
669 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
670 *(this->_M_finish) = __x;
679 this->_M_end_of_storage.swap(__x._M_end_of_storage);
681 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 687 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position ==
end()) {
688 *(this->_M_finish) = __x;
696 #if defined (_STLP_MEMBER_TEMPLATES) 698 template <
class _Integer>
699 void _M_insert_dispatch(
iterator __pos, _Integer
__n, _Integer __x,
704 template <
class _InputIterator>
705 void _M_insert_dispatch(
iterator __pos,
706 _InputIterator __first, _InputIterator
__last,
712 template <
class _InputIterator>
714 _InputIterator __first, _InputIterator
__last) {
716 _M_insert_dispatch(__position, __first,
__last, _Integral());
721 if (__first ==
__last)
return;
727 this->_M_finish +=
__n;
735 this->_M_deallocate();
736 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
742 if (__first ==
__last)
return;
748 this->_M_finish +=
__n;
756 this->_M_deallocate();
757 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
764 if (
__n == 0)
return;
777 this->_M_deallocate();
778 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
791 if (__position + 1 !=
end())
801 if (__new_size <
size())
807 for (
__chunk_type* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p)
814 #if defined (_STLP_NO_BOOL) || defined (__HP_aCC) // fixed soon (03/17/2000) 815 # define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER 816 # define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED 818 # undef _STLP_TEMPLATE_CONTAINER 819 # undef _STLP_TEMPLATE_HEADER 822 #if defined (_STLP_DEBUG) && !defined (_STLP_NO_BOOL) 830 #undef _STLP_VECBOOL_TEMPLATE 832 #undef __BVECTOR_QUALIFIED 833 #undef __BVEC_TMPL_HEADER 835 #undef _STLP_WORD_BIT #define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
_Bit_iterator_base(unsigned int *__x, unsigned int __y)
const_iterator begin() const
__chunk_type * _M_bit_alloc(size_t __n)
random_access_iterator_tag iterator_category
void _M_fill_insert(iterator __position, size_type __n, bool __x)
__BVECTOR_QUALIFIED & operator=(const __BVECTOR_QUALIFIED &__x)
_STLP_PRIV _Bit_reference * pointer
_Bit_iter(unsigned int *__x, unsigned int __y)
__BVECTOR(const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
__BVECTOR(__move_source< _Self > src)
#define random_access_iterator_tag
__bool2type< pod >::_Ret is_POD_type
#define __STATIC_CAST(__x, __y)
__true_type has_trivial_copy_constructor
void swap(__BVECTOR_QUALIFIED &__x)
allocator_type get_allocator() const
size_type capacity() const
void insert(iterator __position, const_iterator __first, const_iterator __last)
_Self & operator-=(difference_type __i)
_STLP_alloc_proxy< __chunk_type *, __chunk_type, __chunk_allocator_type > _M_end_of_storage
_BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, const bidirectional_iterator_tag &, _Distance *)
void resize(size_type __new_size, bool __x=bool())
_STLP_MOVE_TO_STD_NAMESPACE void swap(_STLP_PRIV _Bit_reference &__x, _STLP_PRIV _Bit_reference &__y)
void insert(iterator __position, const bool *__first, const bool *__last)
_Bit_reference & operator &=(bool __x)
const bool * const_pointer
const_reverse_iterator rbegin() const
_Self operator-(difference_type __i) const
_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_Alloc_traits< __chunk_type, _Alloc >::allocator_type __chunk_allocator_type
__false_type has_trivial_assignment_operator
reverse_iterator rbegin()
GLsizei GLsizei GLfloat distance
#define _STLP_MOVE_TO_PRIV_NAMESPACE
reference operator *() const
_Bit_reference & operator|=(bool __x)
_Tp * allocate(size_type __n, size_type &__allocated_n)
difference_type operator-(const _Self &__x) const
bool operator==(const _Bit_reference &__x) const
_STLP_PRIV _Bit_reference reference
iterator erase(iterator __first, iterator __last)
__false_type has_trivial_default_constructor
const_reference operator[](size_type __n) const
iterator erase(iterator __position)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_range_error(const char *__msg)
ptrdiff_t difference_type
_STLP_PRIV _Bvector_base< _Alloc >::__chunk_type __chunk_type
void reserve(size_type __n)
_STLP_INLINE_LOOP _InputIter __last
_Bvector_base(__move_source< _Self > src)
void _M_initialize(size_type __n)
typedef bool(CARDLIBPROC *pCanDragProc)(CardRegion &stackobj
__BVECTOR(const _Self &__x)
random_access_iterator_tag _Iterator_category
difference_type _M_subtract(const _Bit_iterator_base &__x) const
const_reference front() const
void assign(size_t __n, bool __x)
#define _STLP_MOVE_TO_STD_NAMESPACE
void get(int argc, const char *argv[])
void _M_range_check(size_type __n) const
bool _STLP_CALL operator>=(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
bool _STLP_CALL operator==(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
unsigned int __chunk_type
_Bit_iter< _Bit_reference, _Bit_reference * > _Bit_iterator
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
static size_t _M_bits_to_chunks(size_t __n_bits)
#define _STLP_ALLOCATOR_TYPE_DFL
_STLP_INLINE_LOOP _InputIter const _Tp & __val
_Bvector_base(const allocator_type &__a)
_Self operator+(difference_type __i) const
bool _STLP_CALL operator<=(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
__bool2type< trivial_constructor >::_Ret has_trivial_default_constructor
#define __BVEC_TMPL_HEADER
__BVECTOR(const allocator_type &__a=allocator_type())
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_length_error(const char *__msg)
void insert(iterator __position, size_type __n, bool __x)
_STLP_PRIV _Bvector_base< _Alloc >::allocator_type allocator_type
size_type max_size() const
reference at(size_type __n)
__true_type has_trivial_destructor
_Bit_reference(unsigned int *__x, unsigned int __y)
__BVECTOR(size_type __n, bool __val, const allocator_type &__a=allocator_type())
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
bool _STLP_CALL operator<(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
#define _STLP_TEMPLATE_NULL
_STLP_MOVE_TO_STD_NAMESPACE void fill_n(_OutputIter __first, _Size __n, const _Tp &__val)
const_reverse_iterator rend() const
_STLP_PRIV _Bit_iterator iterator
void _M_advance(difference_type __i)
_STLP_PRIV _Bit_const_iterator const_iterator
bool _STLP_CALL operator!=(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
bool _STLP_CALL operator>(const _Bit_iterator_base &__x, const _Bit_iterator_base &__y)
_STLP_MOVE_TO_STD_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE typedef _Bit_iter< bool, const bool * > _Bit_const_iterator
iterator insert(iterator __position, bool __x=bool())
_Self & operator+=(difference_type __i)
__bool2type< trivial_assign >::_Ret has_trivial_assignment_operator
#define _STLP_END_NAMESPACE
reference operator[](size_type __n)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
__bool2type< trivial_copy >::_Ret has_trivial_copy_constructor
__kernel_ptrdiff_t ptrdiff_t
_STLP_PRIV _Bvector_base< _Alloc > _Base
const_iterator end() const
void _M_insert_aux(iterator __position, bool __x)
const_reference at(size_type __n) const
#define _STLP_BEGIN_NAMESPACE
const_reference back() const
reference operator[](difference_type __i)
_Bit_iter< _Ref, _Ptr > _Self
_Bit_iter< _Ref, _Ptr > _STLP_CALL operator+(ptrdiff_t __n, const _Bit_iter< _Ref, _Ptr > &__x)
_Bvector_base< _Alloc > _Self
__BVECTOR_QUALIFIED _Self
__bool2type< trivial_destructor >::_Ret has_trivial_destructor
bool operator<(const _Bit_reference &__x) const
_Bit_iter(const _Bit_iter< _Bit_reference, _Bit_reference * > &__x)
ptrdiff_t difference_type
ptrdiff_t difference_type
void _M_fill_assign(size_t __n, bool __x)
__BVECTOR(const bool *__first, const bool *__last, const allocator_type &__a=allocator_type())
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
_Bit_reference & operator=(bool __x)
#define _STLP_FORCE_ALLOCATORS(a, y)