ReactOS 0.4.16-dev-319-g6cf4263
deque< _Tp, > Class Template Reference

#include <_deque.h>

Inheritance diagram for deque< _Tp, >:
Collaboration diagram for deque< _Tp, >:

Public Types

typedef _Tp value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef random_access_iterator_tag _Iterator_category
 
typedef _Base::allocator_type allocator_type
 
typedef _Base::iterator iterator
 
typedef _Base::const_iterator const_iterator
 
typedef _STLP_PRIV _DBG_iter< _Base, _STLP_PRIV _DbgTraits< _Nonconst_traits< value_type > > > iterator
 
typedef _STLP_PRIV _DBG_iter< _Base, _STLP_PRIV _DbgTraits< _Const_traits< value_type > > > const_iterator
 
typedef _Tp value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef random_access_iterator_tag _Iterator_category
 
typedef _Alloc_traits< value_type, _Alloc >::allocator_type allocator_type
 
typedef _STLP_PRIV _Deque_iterator< value_type, _Nonconst_traits< value_type > > iterator
 
typedef _STLP_PRIV _Deque_iterator< value_type, _Const_traits< value_type > > const_iterator
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
reference operator[] (size_type __n)
 
const_reference operator[] (size_type __n) const
 
void _M_range_check (size_type __n) const
 
reference at (size_type __n)
 
const_reference at (size_type __n) const
 
reference front ()
 
reference back ()
 
const_reference front () const
 
const_reference back () const
 
size_type size () const
 
size_type max_size () const
 
bool empty () const
 
allocator_type get_allocator () const
 
 deque (const allocator_type &__a=allocator_type())
 
 deque (const _Self &__x)
 
 deque (size_type __n)
 
 deque (size_type __n, const value_type &__val, const allocator_type &__a=allocator_type())
 
 deque (const value_type *__first, const value_type *__last, const allocator_type &__a=allocator_type())
 
 deque (const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
 
 deque (__move_source< _Self > src)
 
 ~deque ()
 
_Selfoperator= (const _Self &__x)
 
void swap (_Self &__x)
 
void _M_fill_assign (size_type __n, const _Tp &__val)
 
void assign (size_type __n, const _Tp &__val)
 
void assign (const value_type *__first, const value_type *__last)
 
void assign (const_iterator __first, const_iterator __last)
 
void push_back (const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
 
void push_front (const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
 
void pop_back ()
 
void pop_front ()
 
iterator insert (iterator __pos, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
 
void insert (iterator __pos, size_type __n, const value_type &__x)
 
void insert (iterator __pos, const value_type *__first, const value_type *__last)
 
void insert (iterator __pos, const_iterator __first, const_iterator __last)
 
void resize (size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
 
iterator erase (iterator __pos)
 
iterator erase (iterator __first, iterator __last)
 
void clear ()
 
allocator_type get_allocator () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
reference operator[] (size_type __n)
 
const_reference operator[] (size_type __n) const
 
reference at (size_type __n)
 
const_reference at (size_type __n) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
 deque (const allocator_type &__a=allocator_type())
 
 deque (const _Self &__x)
 
 deque (size_type __n, const value_type &__x=_Tp(), const allocator_type &__a=allocator_type())
 
 deque (__move_source< _Self > src)
 
 deque (const value_type *__first, const value_type *__last, const allocator_type &__a=allocator_type())
 
 deque (const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
 
_Selfoperator= (const _Self &__x)
 
bool empty () const
 
size_type size () const
 
size_type max_size () const
 
void swap (_Self &__x)
 
void assign (size_type __n, const _Tp &__val)
 
void assign (const_iterator __first, const_iterator __last)
 
void assign (const value_type *__first, const value_type *__last)
 
void push_back (const value_type &__t=_Tp())
 
void push_front (const value_type &__t=_Tp())
 
void pop_back ()
 
void pop_front ()
 
iterator insert (iterator __pos, const value_type &__x=_Tp())
 
void insert (iterator __pos, size_type __n, const value_type &__x)
 
void insert (iterator __pos, const value_type *__first, const value_type *__last)
 
void insert (iterator __pos, const_iterator __first, const_iterator __last)
 
void insert (iterator __pos, iterator __first, iterator __last)
 
void resize (size_type __new_size, const value_type &__x=_Tp())
 
iterator erase (iterator __pos)
 
iterator erase (iterator __first, iterator __last)
 
void clear ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
reference operator[] (size_type __n)
 
const_reference operator[] (size_type __n) const
 
reference at (size_type __n)
 
const_reference at (size_type __n) const
 
reference front ()
 
reference back ()
 
const_reference front () const
 
const_reference back () const
 
size_type size () const
 
size_type max_size () const
 
bool empty () const
 
allocator_type get_allocator () const
 
 deque (const allocator_type &__a=allocator_type())
 
 deque (const _Self &__x)
 
 deque (size_type __n, const value_type &__val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
 
 deque (const_pointer __first, const_pointer __last, const allocator_type &__a=allocator_type())
 
 deque (const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
 
 deque (__move_source< _Self > src)
 
_Selfoperator= (const _Self &__x)
 
void swap (_Self &__x)
 
void assign (size_type __n, const value_type &__val)
 
void assign (const_pointer __first, const_pointer __last)
 
void assign (const_iterator __first, const_iterator __last)
 
void push_back (const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(value_type))
 
void push_front (const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(value_type))
 
void pop_back ()
 
void pop_front ()
 
iterator insert (iterator __pos, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(value_type))
 
void insert (iterator __pos, size_type __n, const value_type &__x)
 
void insert (iterator __pos, const_pointer __first, const_pointer __last)
 
void insert (iterator __pos, const_iterator __first, const_iterator __last)
 
void resize (size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(value_type))
 
iterator erase (iterator __pos)
 
iterator erase (iterator __first, iterator __last)
 
void clear ()
 

Public Attributes

 _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS
 

Protected Types

typedef pointer_Map_pointer
 

Protected Member Functions

iterator _M_fill_insert_aux (iterator __pos, size_type __n, const value_type &__x, const __true_type &)
 
iterator _M_fill_insert_aux (iterator __pos, size_type __n, const value_type &__x, const __false_type &)
 
void _M_fill_insert (iterator __pos, size_type __n, const value_type &__x)
 
void _M_insert_range_aux (iterator __pos, const value_type *__first, const value_type *__last, size_type __n, const __true_type &)
 
void _M_insert_range_aux (iterator __pos, const value_type *__first, const value_type *__last, size_type __n, const __false_type &)
 
void _M_insert_range_aux (iterator __pos, const_iterator __first, const_iterator __last, size_type __n, const __true_type &)
 
void _M_insert_range_aux (iterator __pos, const_iterator __first, const_iterator __last, size_type __n, const __false_type &)
 
iterator _M_erase (iterator __pos, const __true_type &)
 
iterator _M_erase (iterator __pos, const __false_type &)
 
iterator _M_erase (iterator __first, iterator __last, const __true_type &)
 
iterator _M_erase (iterator __first, iterator __last, const __false_type &)
 
void _M_fill_initialize (const value_type &__val, const __true_type &)
 
void _M_fill_initialize (const value_type &__val, const __false_type &)
 
void _M_push_back_aux_v (const value_type &)
 
void _M_push_front_aux_v (const value_type &)
 
void _M_pop_back_aux ()
 
void _M_pop_front_aux ()
 
iterator _M_reserve_elements_at_front (size_type __n)
 
iterator _M_reserve_elements_at_back (size_type __n)
 
void _M_new_elements_at_front (size_type __new_elements)
 
void _M_new_elements_at_back (size_type __new_elements)
 
void _M_reserve_map_at_back (size_type __nodes_to_add=1)
 
void _M_reserve_map_at_front (size_type __nodes_to_add=1)
 
void _M_reallocate_map (size_type __nodes_to_add, bool __add_at_front)
 
void _Invalidate_all ()
 
void _Invalidate_iterator (const iterator &__it)
 
void _Invalidate_iterators (const iterator &__first, const iterator &__last)
 

Protected Attributes

_Base _M_non_dbg_impl
 
_STLP_PRIV __owned_list _M_iter_list
 

Private Types

typedef _STLP_PRIV _Deque_base< _Tp, _Alloc_Base
 
typedef deque< _Tp, _Alloc_Self
 
typedef deque< _Tp, _Alloc_Self
 
typedef _STLP_NON_DBG_DEQUE _Base
 
typedef _STLP_PRIV __construct_checker< _STLP_NON_DBG_DEQUE_ConstructCheck
 
typedef _STLP_TYPENAME _STLP_PRIV _StorageType< _Tp >::_Type _StorageType
 
typedef _Alloc_traits< _StorageType, _Alloc >::allocator_type _StorageTypeAlloc
 
typedef _STLP_PRIV DEQUE_IMPL< _StorageType, _StorageTypeAlloc_Base
 
typedef deque< _Tp, _Alloc_Self
 
typedef _STLP_PRIV _CastTraits< _StorageType, _Tp > cast_traits
 
typedef _STLP_PRIV _DequeIteCast< _StorageType, _Tp > ite_cast_traits
 

Private Member Functions

void _M_initialize (size_type __n, const value_type &__val=_STLP_DEFAULT_CONSTRUCTED(_Tp))
 

Private Attributes

_Base _M_impl
 

Detailed Description

template<class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >)>
class deque< _Tp, >

Definition at line 400 of file _deque.h.

Member Typedef Documentation

◆ _Base [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV _Deque_base<_Tp, _Alloc> deque< _Tp, >::_Base
private

Definition at line 405 of file _deque.h.

◆ _Base [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_NON_DBG_DEQUE deque< _Tp, >::_Base
private

Definition at line 61 of file _deque.h.

◆ _Base [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV DEQUE_IMPL<_StorageType, _StorageTypeAlloc> deque< _Tp, >::_Base
private

Definition at line 104 of file _deque.h.

◆ _ConstructCheck

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_DEQUE > deque< _Tp, >::_ConstructCheck
private

Definition at line 62 of file _deque.h.

◆ _Iterator_category [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef random_access_iterator_tag deque< _Tp, >::_Iterator_category

Definition at line 415 of file _deque.h.

◆ _Iterator_category [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef random_access_iterator_tag deque< _Tp, >::_Iterator_category

Definition at line 118 of file _deque.h.

◆ _Map_pointer

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef pointer* deque< _Tp, >::_Map_pointer
protected

Definition at line 426 of file _deque.h.

◆ _Self [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef deque<_Tp, _Alloc> deque< _Tp, >::_Self
private

Definition at line 406 of file _deque.h.

◆ _Self [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef deque<_Tp,_Alloc> deque< _Tp, >::_Self
private

Definition at line 60 of file _deque.h.

◆ _Self [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef deque<_Tp, _Alloc> deque< _Tp, >::_Self
private

Definition at line 105 of file _deque.h.

◆ _StorageType

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type deque< _Tp, >::_StorageType
private

Definition at line 102 of file _deque.h.

◆ _StorageTypeAlloc

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Alloc_traits<_StorageType,_Alloc>::allocator_type deque< _Tp, >::_StorageTypeAlloc
private

Definition at line 103 of file _deque.h.

◆ allocator_type [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Base::allocator_type deque< _Tp, >::allocator_type

Definition at line 417 of file _deque.h.

◆ allocator_type [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Alloc_traits<value_type,_Alloc>::allocator_type deque< _Tp, >::allocator_type

Definition at line 120 of file _deque.h.

◆ cast_traits

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> deque< _Tp, >::cast_traits
private

Definition at line 107 of file _deque.h.

◆ const_iterator [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Base::const_iterator deque< _Tp, >::const_iterator

Definition at line 421 of file _deque.h.

◆ const_iterator [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Const_traits<value_type> > > deque< _Tp, >::const_iterator

Definition at line 70 of file _deque.h.

◆ const_iterator [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV _Deque_iterator<value_type, _Const_traits<value_type> > deque< _Tp, >::const_iterator

Definition at line 122 of file _deque.h.

◆ const_pointer [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef const value_type* deque< _Tp, >::const_pointer

Definition at line 410 of file _deque.h.

◆ const_pointer [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef const value_type* deque< _Tp, >::const_pointer

Definition at line 113 of file _deque.h.

◆ const_reference [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef const value_type& deque< _Tp, >::const_reference

Definition at line 412 of file _deque.h.

◆ const_reference [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef const value_type& deque< _Tp, >::const_reference

Definition at line 115 of file _deque.h.

◆ difference_type [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef ptrdiff_t deque< _Tp, >::difference_type

Definition at line 414 of file _deque.h.

◆ difference_type [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef ptrdiff_t deque< _Tp, >::difference_type

Definition at line 117 of file _deque.h.

◆ ite_cast_traits

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _STLP_PRIV _DequeIteCast<_StorageType, _Tp> deque< _Tp, >::ite_cast_traits
private

Definition at line 108 of file _deque.h.

◆ iterator [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Base::iterator deque< _Tp, >::iterator

Definition at line 420 of file _deque.h.

◆ iterator [2/3]

Definition at line 69 of file _deque.h.

◆ iterator [3/3]

Definition at line 121 of file _deque.h.

◆ pointer [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef value_type* deque< _Tp, >::pointer

Definition at line 409 of file _deque.h.

◆ pointer [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef value_type* deque< _Tp, >::pointer

Definition at line 112 of file _deque.h.

◆ reference [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef value_type& deque< _Tp, >::reference

Definition at line 411 of file _deque.h.

◆ reference [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef value_type& deque< _Tp, >::reference

Definition at line 114 of file _deque.h.

◆ size_type [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef size_t deque< _Tp, >::size_type

Definition at line 413 of file _deque.h.

◆ size_type [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef size_t deque< _Tp, >::size_type

Definition at line 116 of file _deque.h.

◆ value_type [1/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Tp deque< _Tp, >::value_type

Definition at line 408 of file _deque.h.

◆ value_type [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
typedef _Tp deque< _Tp, >::value_type

Definition at line 111 of file _deque.h.

Constructor & Destructor Documentation

◆ deque() [1/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const allocator_type __a = allocator_type())
inlineexplicit

Definition at line 478 of file _deque.h.

482 deque(const allocator_type& __a)
483#endif
#define _STLP_PRIV
Definition: _dm.h:70
Definition: _deque.h:404
_Base::allocator_type allocator_type
Definition: _deque.h:417

◆ deque() [2/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const _Self __x)
inline

Definition at line 486 of file _deque.h.

487 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__x.get_allocator(), __x.size())
488 { _STLP_PRIV __ucopy(__x.begin(), __x.end(), this->_M_start); }
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __ucopy(_InputIter __first, _InputIter __last, _OutputIter __result, _Distance *)

◆ deque() [3/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( size_type  __n)
inlineexplicit

Definition at line 497 of file _deque.h.

499 { _M_initialize(__n); }
return __n
Definition: _algo.h:75
void _M_initialize(size_type __n, const value_type &__val=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:492

◆ deque() [4/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( size_type  __n,
const value_type __val,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 500 of file _deque.h.

504 typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
506 }
510 deque(size_type __n, const value_type& __val, const allocator_type& __a)
511#endif
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _Alloc
Definition: _bvector.h:330
#define _STLP_DEFAULT_CONSTRUCTED(_TTp)
Definition: _construct.h:265
_Tp value_type
Definition: _deque.h:408
size_t size_type
Definition: _deque.h:413
void _M_fill_initialize(const value_type &__val, const __true_type &)
Definition: _deque.h:859

◆ deque() [5/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const value_type __first,
const value_type __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 549 of file _deque.h.

552 { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68

◆ deque() [6/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const_iterator  __first,
const_iterator  __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 554 of file _deque.h.

557 { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }

◆ deque() [7/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( __move_source< _Self src)
inline

Definition at line 561 of file _deque.h.

◆ ~deque()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::~deque ( )
inline

Definition at line 566 of file _deque.h.

567 { _STLP_STD::_Destroy_Range(this->_M_start, this->_M_finish); }

◆ deque() [8/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const allocator_type __a = allocator_type())
inlineexplicit

Definition at line 129 of file _deque.h.

129 :
_Base _M_non_dbg_impl
Definition: _deque.h:75
_STLP_PRIV __owned_list _M_iter_list
Definition: _deque.h:76

◆ deque() [9/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const _Self __x)
inline

Definition at line 131 of file _deque.h.

131 :
132 _ConstructCheck(__x), _M_non_dbg_impl(__x._M_non_dbg_impl),
_STLP_PRIV __construct_checker< _STLP_NON_DBG_DEQUE > _ConstructCheck
Definition: _deque.h:62

◆ deque() [10/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( size_type  __n,
const value_type __x = _Tp(),
const allocator_type __a = allocator_type() 
)
inlineexplicit

Definition at line 136 of file _deque.h.

140 :

◆ deque() [11/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( __move_source< _Self src)
inline

Definition at line 148 of file _deque.h.

149 : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
151# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
152 src.get()._M_iter_list._Invalidate_all();
153# else
154 src.get()._M_iter_list._Set_owner(_M_iter_list);
155# endif
156 }

◆ deque() [12/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const value_type __first,
const value_type __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 176 of file _deque.h.

178 : _ConstructCheck(__first, __last),
179 _M_non_dbg_impl(__first, __last, __a),
181 }

◆ deque() [13/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const_iterator  __first,
const_iterator  __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 183 of file _deque.h.

185 : _ConstructCheck(__first, __last),
186 _M_non_dbg_impl(__first._M_iterator, __last._M_iterator, __a),
188 }

◆ deque() [14/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const allocator_type __a = allocator_type())
inlineexplicit

Definition at line 159 of file _deque.h.

#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
Definition: _alloc.h:183
_Base _M_impl
Definition: _deque.h:371

◆ deque() [15/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const _Self __x)
inline

Definition at line 162 of file _deque.h.

162: _M_impl(__x._M_impl) {}

◆ deque() [16/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( size_type  __n,
const value_type __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
const allocator_type __a = allocator_type() 
)
inlineexplicit

Definition at line 165 of file _deque.h.

170 : _M_impl(__n, cast_traits::to_storage_type_cref(__val), _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}

◆ deque() [17/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const_pointer  __first,
const_pointer  __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 202 of file _deque.h.

204 : _M_impl(cast_traits::to_storage_type_cptr(__first),
205 cast_traits::to_storage_type_cptr(__last),

◆ deque() [18/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( const_iterator  __first,
const_iterator  __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 208 of file _deque.h.

210 : _M_impl(ite_cast_traits::to_storage_type_cite(__first),
211 ite_cast_traits::to_storage_type_cite(__last),

◆ deque() [19/19]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::deque ( __move_source< _Self src)
inline

Definition at line 216 of file _deque.h.

217 : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}

Member Function Documentation

◆ _Invalidate_all()

◆ _Invalidate_iterator()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_Invalidate_iterator ( const iterator __it)
inlineprotected

Definition at line 80 of file _deque.h.

81 { _STLP_PRIV __invalidate_iterator(&_M_iter_list,__it); }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

Referenced by deque< _Tp, >::erase(), deque< _Tp, >::pop_back(), deque< _Tp, >::pop_front(), and deque< _Tp, >::resize().

◆ _Invalidate_iterators()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_Invalidate_iterators ( const iterator __first,
const iterator __last 
)
inlineprotected

Definition at line 82 of file _deque.h.

83 { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }

Referenced by deque< _Tp, >::erase().

◆ _M_erase() [1/4]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_erase ( iterator  __first,
iterator  __last,
const __false_type  
)
protected

Definition at line 324 of file _deque.c.

325 {
326 difference_type __n = __last - __first;
327 difference_type __elems_before = __first - this->_M_start;
328 if (__elems_before <= difference_type(this->size() - __n) / 2) {
329 copy_backward(this->_M_start, __first, __last);
330 iterator __new_start = this->_M_start + __n;
331 _STLP_STD::_Destroy_Range(this->_M_start, __new_start);
332 this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
333 this->_M_start = __new_start;
334 }
335 else {
336 _STLP_STD::copy(__last, this->_M_finish, __first);
337 iterator __new_finish = this->_M_finish - __n;
338 _STLP_STD::_Destroy_Range(__new_finish, this->_M_finish);
339 this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
340 this->_M_finish = __new_finish;
341 }
342 return this->_M_start + __elems_before;
343}
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result)
Definition: _algobase.h:328
size_type size() const
Definition: _deque.h:471
ptrdiff_t difference_type
Definition: _deque.h:414

◆ _M_erase() [2/4]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_erase ( iterator  __first,
iterator  __last,
const __true_type  
)
protected

Definition at line 260 of file _deque.c.

261 {
262 difference_type __n = __last - __first;
263 difference_type __elems_before = __first - this->_M_start;
264 if (__elems_before <= difference_type(this->size() - __n) / 2) {
265 iterator __src = __first, __dst = __last;
266 if (__src != this->_M_start) {
267 for (--__src, --__dst; (__src >= this->_M_start) && (__dst >= __first); --__src, --__dst) {
268 _STLP_STD::_Destroy(&(*__dst));
269 _STLP_STD::_Move_Construct(&(*__dst), *__src);
270 }
271 if (__dst >= __first) {
272 //There are more elements to erase than elements to move
273 _STLP_STD::_Destroy_Range(__first, ++__dst);
274 _STLP_STD::_Destroy_Moved_Range(this->_M_start, __first);
275 }
276 else {
277 //There are more elements to move than elements to erase
278 for (; __src >= this->_M_start; --__src, --__dst) {
279 _STLP_STD::_Destroy_Moved(&(*__dst));
280 _STLP_STD::_Move_Construct(&(*__dst), *__src);
281 }
282 _STLP_STD::_Destroy_Moved_Range(this->_M_start, ++__dst);
283 }
284 }
285 else {
286 _STLP_STD::_Destroy_Range(this->_M_start, __last);
287 }
288 iterator __new_start = this->_M_start + __n;
289 this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
290 this->_M_start = __new_start;
291 }
292 else {
293 if (__last != this->_M_finish) {
294 iterator __src = __last, __dst = __first;
295 for (; (__src != this->_M_finish) && (__dst != __last); ++__src, ++__dst) {
296 _STLP_STD::_Destroy(&(*__dst));
297 _STLP_STD::_Move_Construct(&(*__dst), *__src);
298 }
299 if (__dst != __last) {
300 //There are more elements to erase than elements to move
301 _STLP_STD::_Destroy_Range(__dst, __last);
302 _STLP_STD::_Destroy_Moved_Range(__last, this->_M_finish);
303 }
304 else {
305 //There are more elements to move than elements to erase
306 for (; __src != this->_M_finish; ++__src, ++__dst) {
307 _STLP_STD::_Destroy_Moved(&(*__dst));
308 _STLP_STD::_Move_Construct(&(*__dst), *__src);
309 }
310 _STLP_STD::_Destroy_Moved_Range(__dst, this->_M_finish);
311 }
312 }
313 else {
314 _STLP_STD::_Destroy_Range(__first, this->_M_finish);
315 }
316 iterator __new_finish = this->_M_finish - __n;
317 this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
318 this->_M_finish = __new_finish;
319 }
320 return this->_M_start + __elems_before;
321}

◆ _M_erase() [3/4]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_erase ( iterator  __pos,
const __false_type  
)
protected

Definition at line 243 of file _deque.c.

244 {
245 iterator __next = __pos;
246 ++__next;
247 difference_type __index = __pos - this->_M_start;
248 if (size_type(__index) < this->size() >> 1) {
249 copy_backward(this->_M_start, __pos, __next);
250 pop_front();
251 }
252 else {
253 _STLP_STD::copy(__next, this->_M_finish, __pos);
254 pop_back();
255 }
256 return this->_M_start + __index;
257}
void pop_front()
Definition: _deque.h:722
void pop_back()
Definition: _deque.h:711

◆ _M_erase() [4/4]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_erase ( iterator  __pos,
const __true_type  
)
protected

Definition at line 208 of file _deque.c.

209 {
210 difference_type __index = __pos - this->_M_start;
211 if (size_type(__index) < this->size() >> 1) {
212 //We move the start of the deque one position to the right
213 //starting from the rightmost element to move.
214 iterator __src = __pos, __dst = __pos;
215 _STLP_STD::_Destroy(&(*__dst));
216 if (__src != this->_M_start) {
217 for (--__src; __dst != this->_M_start; --__src, --__dst) {
218 _STLP_STD::_Move_Construct(&(*__dst), *__src);
219 _STLP_STD::_Destroy_Moved(&(*__src));
220 }
221 }
223 }
224 else {
225 iterator __src = __pos, __dst = __pos;
226 _STLP_STD::_Destroy(&(*__dst));
227 for (++__src; __src != this->_M_finish; ++__src, ++__dst) {
228 _STLP_STD::_Move_Construct(&(*__dst), *__src);
229 _STLP_STD::_Destroy_Moved(&(*__src));
230 }
231 //Duplication of the pop_back code without the destroy which has already been done:
232 if (this->_M_finish._M_cur != this->_M_finish._M_first) {
233 --this->_M_finish._M_cur;
234 }
235 else {
237 }
238 }
239 return this->_M_start + __index;
240}
void _M_pop_front_aux()
Definition: _deque.c:453
void _M_pop_back_aux()
Definition: _deque.c:443

Referenced by deque< _Tp, >::erase(), and deque< _Tp, >::resize().

◆ _M_fill_assign()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_fill_assign ( size_type  __n,
const _Tp &  __val 
)
inline

Definition at line 587 of file _deque.h.

587 {
588 if (__n > size()) {
589 _STLP_STD::fill(begin(), end(), __val);
590 insert(end(), __n - size(), __val);
591 }
592 else {
593 erase(begin() + __n, end());
594 _STLP_STD::fill(begin(), end(), __val);
595 }
596 }
iterator erase(iterator __pos)
Definition: _deque.h:835
iterator end()
Definition: _deque.h:433
iterator begin()
Definition: _deque.h:432
static int insert
Definition: xmllint.c:138

Referenced by deque< _Tp, >::assign().

◆ _M_fill_initialize() [1/2]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_fill_initialize ( const value_type __val,
const __false_type  
)
protected

Definition at line 368 of file _deque.c.

369 {
370 _Map_pointer __cur = this->_M_start._M_node;
371 _STLP_TRY {
372 for (; __cur < this->_M_finish._M_node; ++__cur)
373 uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val);
374 uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val);
375 }
376 _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur, __cur)))
377}
_STLP_MOVE_TO_STD_NAMESPACE void uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__x)
_Base::iterator iterator
Definition: _deque.h:420
pointer * _Map_pointer
Definition: _deque.h:426
#define _STLP_UNWIND(action)
Definition: features.h:824
#define _STLP_TRY
Definition: features.h:817
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:888

◆ _M_fill_initialize() [2/2]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_fill_initialize ( const value_type __val,
const __true_type  
)
inlineprotected

Definition at line 859 of file _deque.h.

860 {}

Referenced by deque< _Tp, >::_M_initialize(), and deque< _Tp, >::deque().

◆ _M_fill_insert()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_fill_insert ( iterator  __pos,
size_type  __n,
const value_type __x 
)
protected

Definition at line 122 of file _deque.c.

123 {
124#if !defined (_STLP_NO_MOVE_SEMANTIC)
125 typedef typename __move_traits<_Tp>::implemented _Movable;
126#endif
127 if (__pos._M_cur == this->_M_start._M_cur) {
129 _STLP_TRY {
130 uninitialized_fill(__new_start, this->_M_start, __x);
131 }
132 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
133 this->_M_start = __new_start;
134 }
135 else if (__pos._M_cur == this->_M_finish._M_cur) {
137 _STLP_TRY {
138 uninitialized_fill(this->_M_finish, __new_finish, __x);
139 }
140 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1))
141 this->_M_finish = __new_finish;
142 }
143 else
144 _M_fill_insert_aux(__pos, __n, __x, _Movable());
145}
iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type &__x, const __true_type &)
Definition: _deque.c:464
iterator _M_reserve_elements_at_back(size_type __n)
Definition: _deque.h:1044
iterator _M_reserve_elements_at_front(size_type __n)
Definition: _deque.h:1037
if(dx< 0)
Definition: linetemp.h:194
else
Definition: tritemp.h:161

Referenced by deque< _Tp, >::insert().

◆ _M_fill_insert_aux() [1/2]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_fill_insert_aux ( iterator  __pos,
size_type  __n,
const value_type __x,
const __false_type  
)
protected

Definition at line 506 of file _deque.c.

508 {
509 const difference_type __elems_before = __pos - this->_M_start;
510 size_type __length = this->size();
511 value_type __x_copy = __x;
512 if (__elems_before <= difference_type(__length / 2)) {
514 iterator __old_start = this->_M_start;
515 __pos = this->_M_start + __elems_before;
516 _STLP_TRY {
517 if (__elems_before >= difference_type(__n)) {
518 iterator __start_n = this->_M_start + difference_type(__n);
519 _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
520 this->_M_start = __new_start;
521 _STLP_STD::copy(__start_n, __pos, __old_start);
522 _STLP_STD::fill(__pos - difference_type(__n), __pos, __x_copy);
523 __pos -= difference_type(__n);
524 }
525 else {
526 _STLP_PRIV __uninitialized_copy_fill(this->_M_start, __pos, __new_start,
527 this->_M_start, __x_copy);
528 this->_M_start = __new_start;
529 fill(__old_start, __pos, __x_copy);
530 }
531 }
532 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
533 }
534 else {
536 iterator __old_finish = this->_M_finish;
537 const difference_type __elems_after =
538 difference_type(__length) - __elems_before;
539 __pos = this->_M_finish - __elems_after;
540 _STLP_TRY {
541 if (__elems_after > difference_type(__n)) {
542 iterator __finish_n = this->_M_finish - difference_type(__n);
543 _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
544 this->_M_finish = __new_finish;
545 copy_backward(__pos, __finish_n, __old_finish);
546 fill(__pos, __pos + difference_type(__n), __x_copy);
547 }
548 else {
550 __x_copy, __pos, this->_M_finish);
551 this->_M_finish = __new_finish;
552 fill(__pos, __old_finish, __x_copy);
553 }
554 }
555 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
556 }
557 return __pos;
558}
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
Definition: _algobase.h:449
void __uninitialized_copy_fill(_Iter __first1, _Iter __last1, _Iter __first2, _Iter __last2, const _Tp &__x)
_ForwardIter __uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp &__x, _InputIter __first, _InputIter __last)

◆ _M_fill_insert_aux() [2/2]

template<class _Tp , class _Alloc >
__iterator__ deque< _Tp, _Alloc >::_M_fill_insert_aux ( iterator  __pos,
size_type  __n,
const value_type __x,
const __true_type  
)
protected

Definition at line 464 of file _deque.c.

466 {
467 const difference_type __elems_before = __pos - this->_M_start;
468 size_type __length = this->size();
469 value_type __x_copy = __x;
470 if (__elems_before <= difference_type(__length / 2)) {
472 __pos = this->_M_start + __elems_before;
473 _STLP_TRY {
474 iterator __dst = __new_start;
475 iterator __src = this->_M_start;
476 for (; __src != __pos; ++__dst, ++__src) {
477 _STLP_STD::_Move_Construct(&(*__dst), *__src);
478 _STLP_STD::_Destroy_Moved(&(*__src));
479 }
480 this->_M_start = __new_start;
481 uninitialized_fill(__dst, __src, __x_copy);
482 __pos = __dst;
483 }
484 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
485 }
486 else {
488 const difference_type __elems_after = difference_type(__length) - __elems_before;
489 __pos = this->_M_finish - __elems_after;
490 _STLP_TRY {
491 iterator __dst = __new_finish;
492 iterator __src = this->_M_finish;
493 for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
494 _STLP_STD::_Move_Construct(&(*__dst), *__src);
495 _STLP_STD::_Destroy_Moved(&(*__src));
496 }
497 this->_M_finish = __new_finish;
498 uninitialized_fill(__pos, __pos + __n, __x_copy);
499 }
500 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
501 }
502 return __pos;
503}

Referenced by deque< _Tp, >::insert().

◆ _M_initialize()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_initialize ( size_type  __n,
const value_type __val = _STLP_DEFAULT_CONSTRUCTED(_Tp) 
)
inlineprivate

Definition at line 492 of file _deque.h.

492 {
493 typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
495 }

Referenced by deque< _Tp, >::deque().

◆ _M_insert_range_aux() [1/4]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_insert_range_aux ( iterator  __pos,
const value_type __first,
const value_type __last,
size_type  __n,
const __false_type  
)
protected

Definition at line 601 of file _deque.c.

603 {
604 const difference_type __elems_before = __pos - this->_M_start;
605 size_type __length = size();
606 if (__elems_before <= difference_type(__length / 2)) {
608 iterator __old_start = this->_M_start;
609 __pos = this->_M_start + __elems_before;
610 _STLP_TRY {
611 if (__elems_before >= difference_type(__n)) {
612 iterator __start_n = this->_M_start + difference_type(__n);
613 _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
614 this->_M_start = __new_start;
615 _STLP_STD::copy(__start_n, __pos, __old_start);
616 _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
617 }
618 else {
619 const value_type* __mid = __first + (difference_type(__n) - __elems_before);
620 _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
621 this->_M_start = __new_start;
622 _STLP_STD::copy(__mid, __last, __old_start);
623 }
624 }
625 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
626 }
627 else {
629 iterator __old_finish = this->_M_finish;
630 const difference_type __elems_after =
631 difference_type(__length) - __elems_before;
632 __pos = this->_M_finish - __elems_after;
633 _STLP_TRY {
634
635 if (__elems_after > difference_type(__n)) {
636 iterator __finish_n = this->_M_finish - difference_type(__n);
637 _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
638 this->_M_finish = __new_finish;
639 _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
640 _STLP_STD::copy(__first, __last, __pos);
641 }
642 else {
643 const value_type* __mid = __first + __elems_after;
644 _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
645 this->_M_finish = __new_finish;
646 _STLP_STD::copy(__first, __mid, __pos);
647 }
648 }
649 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
650 }
651}
_STLP_MOVE_TO_PRIV_NAMESPACE _ForwardIter __uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _ForwardIter __result)

◆ _M_insert_range_aux() [2/4]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_insert_range_aux ( iterator  __pos,
const value_type __first,
const value_type __last,
size_type  __n,
const __true_type  
)
protected

Definition at line 562 of file _deque.c.

564 {
565 const difference_type __elems_before = __pos - this->_M_start;
566 size_type __length = size();
567 if (__elems_before <= difference_type(__length / 2)) {
569 __pos = this->_M_start + __elems_before;
570 _STLP_TRY {
571 iterator __dst = __new_start;
572 iterator __src = this->_M_start;
573 for (; __src != __pos; ++__dst, ++__src) {
574 _STLP_STD::_Move_Construct(&(*__dst), *__src);
575 _STLP_STD::_Destroy_Moved(&(*__src));
576 }
577 this->_M_start = __new_start;
578 _STLP_PRIV __ucopy(__first, __last, __dst);
579 }
580 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
581 }
582 else {
584 const difference_type __elems_after = difference_type(__length) - __elems_before;
585 __pos = this->_M_finish - __elems_after;
586 _STLP_TRY {
587 iterator __dst = __new_finish;
588 iterator __src = this->_M_finish;
589 for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
590 _STLP_STD::_Move_Construct(&(*__dst), *__src);
591 _STLP_STD::_Destroy_Moved(&(*__src));
592 }
593 this->_M_finish = __new_finish;
594 _STLP_PRIV __ucopy(__first, __last, __pos);
595 }
596 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
597 }
598}

◆ _M_insert_range_aux() [3/4]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_insert_range_aux ( iterator  __pos,
const_iterator  __first,
const_iterator  __last,
size_type  __n,
const __false_type  
)
protected

Definition at line 693 of file _deque.c.

695 {
696 const difference_type __elems_before = __pos - this->_M_start;
697 size_type __length = size();
698 if (__elems_before < difference_type(__length / 2)) {
700 iterator __old_start = this->_M_start;
701 __pos = this->_M_start + __elems_before;
702 _STLP_TRY {
703 if (__elems_before >= difference_type(__n)) {
704 iterator __start_n = this->_M_start + __n;
705 _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
706 this->_M_start = __new_start;
707 _STLP_STD::copy(__start_n, __pos, __old_start);
708 _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
709 }
710 else {
711 const_iterator __mid = __first + (__n - __elems_before);
712 _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
713 this->_M_start = __new_start;
714 _STLP_STD::copy(__mid, __last, __old_start);
715 }
716 }
717 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
718 }
719 else {
721 iterator __old_finish = this->_M_finish;
722 const difference_type __elems_after = __length - __elems_before;
723 __pos = this->_M_finish - __elems_after;
724 _STLP_TRY {
725 if (__elems_after > difference_type(__n)) {
726 iterator __finish_n = this->_M_finish - difference_type(__n);
727 _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
728 this->_M_finish = __new_finish;
729 _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
730 _STLP_STD::copy(__first, __last, __pos);
731 }
732 else {
733 const_iterator __mid = __first + __elems_after;
734 _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
735 this->_M_finish = __new_finish;
736 _STLP_STD::copy(__first, __mid, __pos);
737 }
738 }
739 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
740 }
741}
_Base::const_iterator const_iterator
Definition: _deque.h:421

◆ _M_insert_range_aux() [4/4]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_insert_range_aux ( iterator  __pos,
const_iterator  __first,
const_iterator  __last,
size_type  __n,
const __true_type  
)
protected

Definition at line 654 of file _deque.c.

656 {
657 const difference_type __elems_before = __pos - this->_M_start;
658 size_type __length = size();
659 if (__elems_before <= difference_type(__length / 2)) {
661 __pos = this->_M_start + __elems_before;
662 _STLP_TRY {
663 iterator __dst = __new_start;
664 iterator __src = this->_M_start;
665 for (; __src != __pos; ++__dst, ++__src) {
666 _STLP_STD::_Move_Construct(&(*__dst), *__src);
667 _STLP_STD::_Destroy_Moved(&(*__src));
668 }
669 this->_M_start = __new_start;
670 _STLP_PRIV __ucopy(__first, __last, __dst);
671 }
672 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
673 }
674 else {
676 const difference_type __elems_after = difference_type(__length) - __elems_before;
677 __pos = this->_M_finish - __elems_after;
678 _STLP_TRY {
679 iterator __dst = __new_finish;
680 iterator __src = this->_M_finish;
681 for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
682 _STLP_STD::_Move_Construct(&(*__dst), *__src);
683 _STLP_STD::_Destroy_Moved(&(*__src));
684 }
685 this->_M_finish = __new_finish;
686 _STLP_PRIV __ucopy(__first, __last, __pos);
687 }
688 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
689 }
690}

◆ _M_new_elements_at_back()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_new_elements_at_back ( size_type  __new_elements)
protected

Definition at line 759 of file _deque.c.

759 {
760 size_type __new_nodes
761 = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
762 _M_reserve_map_at_back(__new_nodes);
763 size_type __i = 1;
764 _STLP_TRY {
765 for (; __i <= __new_nodes; ++__i)
766 *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size());
767 }
768 _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
769 this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size()))
770}
void _M_reserve_map_at_back(size_type __nodes_to_add=1)
Definition: _deque.h:1060

Referenced by deque< _Tp, >::_M_reserve_elements_at_back().

◆ _M_new_elements_at_front()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_new_elements_at_front ( size_type  __new_elements)
protected

Definition at line 745 of file _deque.c.

745 {
746 size_type __new_nodes
747 = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
748 _M_reserve_map_at_front(__new_nodes);
749 size_type __i = 1;
750 _STLP_TRY {
751 for (; __i <= __new_nodes; ++__i)
752 *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size());
753 }
754 _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
755 this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size()))
756}
void _M_reserve_map_at_front(size_type __nodes_to_add=1)
Definition: _deque.h:1065

Referenced by deque< _Tp, >::_M_reserve_elements_at_front().

◆ _M_pop_back_aux()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_pop_back_aux
protected

Definition at line 443 of file _deque.c.

443 {
444 this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
445 this->_M_finish._M_set_node(this->_M_finish._M_node - 1);
446 this->_M_finish._M_cur = this->_M_finish._M_last - 1;
447}

Referenced by deque< _Tp, >::pop_back().

◆ _M_pop_front_aux()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_pop_front_aux
protected

Definition at line 453 of file _deque.c.

453 {
454 if (this->_M_start._M_cur != this->_M_start._M_last - 1)
455 ++this->_M_start._M_cur;
456 else {
457 this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size());
458 this->_M_start._M_set_node(this->_M_start._M_node + 1);
459 this->_M_start._M_cur = this->_M_start._M_first;
460 }
461}

Referenced by deque< _Tp, >::pop_front().

◆ _M_push_back_aux_v()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_push_back_aux_v ( const value_type __t)
protected

Definition at line 382 of file _deque.c.

382 {
384 *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
385 _STLP_TRY {
386 _Copy_Construct(this->_M_finish._M_cur, __t);
387 this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
388 this->_M_finish._M_cur = this->_M_finish._M_first;
389 }
390 _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1),
391 this->buffer_size()))
392}
void _Copy_Construct(_Tp *__p, const _Tp &__val)
Definition: _construct.h:130

Referenced by deque< _Tp, >::push_back().

◆ _M_push_front_aux_v()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_push_front_aux_v ( const value_type __t)
protected

Definition at line 412 of file _deque.c.

412 {
414 *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
415 _STLP_TRY {
416 this->_M_start._M_set_node(this->_M_start._M_node - 1);
417 this->_M_start._M_cur = this->_M_start._M_last - 1;
418 _Copy_Construct(this->_M_start._M_cur, __t);
419 }
420 _STLP_UNWIND((++this->_M_start,
421 this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size())))
422}

Referenced by deque< _Tp, >::push_front().

◆ _M_range_check()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_range_check ( size_type  __n) const
inline

Definition at line 449 of file _deque.h.

449 {
450 if (__n >= this->size())
452 }
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_out_of_range(const char *__msg)
Definition: _range_errors.c:69

Referenced by deque< _Tp, >::at().

◆ _M_reallocate_map()

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::_M_reallocate_map ( size_type  __nodes_to_add,
bool  __add_at_front 
)
protected

Definition at line 773 of file _deque.c.

774 {
775 size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1;
776 size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
777
778 _Map_pointer __new_nstart;
779 if (this->_M_map_size._M_data > 2 * __new_num_nodes) {
780 __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2
781 + (__add_at_front ? __nodes_to_add : 0);
782 if (__new_nstart < this->_M_start._M_node)
783 _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
784 else
785 _STLP_STD::copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1,
786 __new_nstart + __old_num_nodes);
787 }
788 else {
789 size_type __new_map_size =
790 this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2;
791
792 _Map_pointer __new_map = this->_M_map.allocate(__new_map_size);
793 __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
794 + (__add_at_front ? __nodes_to_add : 0);
795 _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
796 this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data);
797
798 this->_M_map._M_data = __new_map;
799 this->_M_map_size._M_data = __new_map_size;
800 }
801
802 this->_M_start._M_set_node(__new_nstart);
803 this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
804}
#define max(a, b)
Definition: svc.c:63

Referenced by deque< _Tp, >::_M_reserve_map_at_back(), and deque< _Tp, >::_M_reserve_map_at_front().

◆ _M_reserve_elements_at_back()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::_M_reserve_elements_at_back ( size_type  __n)
inlineprotected

Definition at line 1044 of file _deque.h.

1044 {
1045 size_type __vacancies = (this->_M_finish._M_last - this->_M_finish._M_cur) - 1;
1046 if (__n > __vacancies)
1047 _M_new_elements_at_back(__n - __vacancies);
1048 return this->_M_finish + difference_type(__n);
1049 }
void _M_new_elements_at_back(size_type __new_elements)
Definition: _deque.c:759

◆ _M_reserve_elements_at_front()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::_M_reserve_elements_at_front ( size_type  __n)
inlineprotected

Definition at line 1037 of file _deque.h.

1037 {
1038 size_type __vacancies = this->_M_start._M_cur - this->_M_start._M_first;
1039 if (__n > __vacancies)
1040 _M_new_elements_at_front(__n - __vacancies);
1041 return this->_M_start - difference_type(__n);
1042 }
void _M_new_elements_at_front(size_type __new_elements)
Definition: _deque.c:745

◆ _M_reserve_map_at_back()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_reserve_map_at_back ( size_type  __nodes_to_add = 1)
inlineprotected

Definition at line 1060 of file _deque.h.

1060 {
1061 if (__nodes_to_add + 1 > this->_M_map_size._M_data - (this->_M_finish._M_node - this->_M_map._M_data))
1062 _M_reallocate_map(__nodes_to_add, false);
1063 }
void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
Definition: _deque.c:773

◆ _M_reserve_map_at_front()

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::_M_reserve_map_at_front ( size_type  __nodes_to_add = 1)
inlineprotected

Definition at line 1065 of file _deque.h.

1065 {
1066 if (__nodes_to_add > size_type(this->_M_start._M_node - this->_M_map._M_data))
1067 _M_reallocate_map(__nodes_to_add, true);
1068 }

◆ assign() [1/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const value_type __first,
const value_type __last 
)
inline

Definition at line 637 of file _deque.h.

637 {
638 size_type __size = size();
639 size_type __len = __last - __first;
640 if (__len > __size) {
641 const value_type *__mid = __first + __size;
642 _STLP_STD::copy(__first, __mid, begin());
643 insert(end(), __mid, __last);
644 }
645 else {
646 erase(_STLP_STD::copy(__first, __last, begin()), end());
647 }
648 }

◆ assign() [2/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const value_type __first,
const value_type __last 
)
inline

Definition at line 230 of file _deque.h.

230 {
231 _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
233 _M_non_dbg_impl.assign(__first, __last);
234 }
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
void _Invalidate_all()
Definition: _deque.h:78

◆ assign() [3/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 649 of file _deque.h.

649 {
650 typedef const_iterator _ForwardIterator;
651#endif /* _STLP_MEMBER_TEMPLATES */
652 size_type __len = _STLP_STD::distance(__first, __last);
653 if (__len > size()) {
654 _ForwardIterator __mid = __first;
655 _STLP_STD::advance(__mid, size());
656 _STLP_STD::copy(__first, __mid, begin());
657 insert(end(), __mid, __last);
658 }
659 else {
660 erase(_STLP_STD::copy(__first, __last, begin()), end());
661 }
662 }

◆ assign() [4/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 225 of file _deque.h.

225 {
226 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
228 _M_non_dbg_impl.assign(__first._M_iterator, __last._M_iterator);
229 }

◆ assign() [5/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 261 of file _deque.h.

262 { _M_impl.assign(ite_cast_traits::to_storage_type_cite(__first),
263 ite_cast_traits::to_storage_type_cite(__last)); }

◆ assign() [6/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( const_pointer  __first,
const_pointer  __last 
)
inline

Definition at line 258 of file _deque.h.

259 { _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
260 cast_traits::to_storage_type_cptr(__last)); }

◆ assign() [7/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( size_type  __n,
const _Tp &  __val 
)
inline

Definition at line 598 of file _deque.h.

598 {
600 }
void _M_fill_assign(size_type __n, const _Tp &__val)
Definition: _deque.h:587

Referenced by MoveConstructorTest::deque_test(), and PtrSpecTest::ptr_specialization_test().

◆ assign() [8/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( size_type  __n,
const _Tp &  __val 
)
inline

Definition at line 212 of file _deque.h.

212 {
214 _M_non_dbg_impl.assign(__n, __val);
215 }

◆ assign() [9/9]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::assign ( size_type  __n,
const value_type __val 
)
inline

Definition at line 227 of file _deque.h.

227 {
228 _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val));
229 }

◆ at() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::at ( size_type  __n)
inline

Definition at line 453 of file _deque.h.

454 { _M_range_check(__n); return (*this)[__n]; }
void _M_range_check(size_type __n) const
Definition: _deque.h:449

◆ at() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::at ( size_type  __n)
inline

Definition at line 108 of file _deque.h.

108{ return _M_non_dbg_impl.at(__n); }

◆ at() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::at ( size_type  __n)
inline

Definition at line 144 of file _deque.h.

145 { return cast_traits::to_value_type_ref(_M_impl.at(__n)); }

◆ at() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::at ( size_type  __n) const
inline

Definition at line 455 of file _deque.h.

456 { _M_range_check(__n); return (*this)[__n]; }

◆ at() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::at ( size_type  __n) const
inline

Definition at line 109 of file _deque.h.

109{ return _M_non_dbg_impl.at(__n); }

◆ at() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::at ( size_type  __n) const
inline

Definition at line 146 of file _deque.h.

147 { return cast_traits::to_value_type_cref(_M_impl.at(__n)); }

◆ back() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::back ( )
inline

Definition at line 459 of file _deque.h.

459 {
460 iterator __tmp = this->_M_finish;
461 --__tmp;
462 return *__tmp;
463 }

◆ back() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::back ( )
inline

Definition at line 119 of file _deque.h.

119 {
120 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
121 return *(--end());
122 }
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
Definition: _debug.h:439
bool empty() const
Definition: _deque.h:473

◆ back() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::back ( )
inline

Definition at line 150 of file _deque.h.

150{ return cast_traits::to_value_type_ref(_M_impl.back()); }

◆ back() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::back ( ) const
inline

Definition at line 465 of file _deque.h.

465 {
466 const_iterator __tmp = this->_M_finish;
467 --__tmp;
468 return *__tmp;
469 }

◆ back() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::back ( ) const
inline

Definition at line 123 of file _deque.h.

123 {
124 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
125 return *(--end());
126 }

◆ back() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::back ( ) const
inline

Definition at line 152 of file _deque.h.

152{ return cast_traits::to_value_type_cref(_M_impl.back()); }

◆ begin() [1/6]

◆ begin() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::begin ( )
inline

Definition at line 89 of file _deque.h.

89{ return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }

◆ begin() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::begin ( )
inline

Definition at line 127 of file _deque.h.

127{ return ite_cast_traits::to_value_type_ite(_M_impl.begin()); }

◆ begin() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::begin ( ) const
inline

Definition at line 434 of file _deque.h.

434{ return const_iterator(this->_M_start); }

◆ begin() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::begin ( ) const
inline

Definition at line 91 of file _deque.h.

91{ return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }

◆ begin() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::begin ( ) const
inline

Definition at line 129 of file _deque.h.

129{ return ite_cast_traits::to_value_type_cite(_M_impl.begin()); }

◆ clear() [1/3]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::clear

Definition at line 346 of file _deque.c.

346 {
347 for (_Map_pointer __node = this->_M_start._M_node + 1;
348 __node < this->_M_finish._M_node;
349 ++__node) {
350 _STLP_STD::_Destroy_Range(*__node, *__node + this->buffer_size());
351 this->_M_map_size.deallocate(*__node, this->buffer_size());
352 }
353
354 if (this->_M_start._M_node != this->_M_finish._M_node) {
355 _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_start._M_last);
356 _STLP_STD::_Destroy_Range(this->_M_finish._M_first, this->_M_finish._M_cur);
357 this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
358 }
359 else
360 _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_finish._M_cur);
361
362 this->_M_finish = this->_M_start;
363}

Referenced by deque< _Tp, >::erase().

◆ clear() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::clear ( )
inline

Definition at line 400 of file _deque.h.

400 {
402 _M_non_dbg_impl.clear();
403 }

◆ clear() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::clear ( )
inline

Definition at line 368 of file _deque.h.

368{ _M_impl.clear(); }

◆ empty() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
bool deque< _Tp, >::empty ( ) const
inline

Definition at line 473 of file _deque.h.

473{ return this->_M_finish == this->_M_start; }

Referenced by deque< _Tp, >::back(), deque< _Tp, >::erase(), deque< _Tp, >::front(), deque< _Tp, >::pop_back(), deque< _Tp, >::pop_front(), and BtrfsPropSheet::search_list_thread().

◆ empty() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
bool deque< _Tp, >::empty ( ) const
inline

Definition at line 199 of file _deque.h.

199{ return _M_non_dbg_impl.empty(); }

◆ empty() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
bool deque< _Tp, >::empty ( ) const
inline

Definition at line 156 of file _deque.h.

156{ return _M_impl.empty(); }

◆ end() [1/6]

◆ end() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::end ( )
inline

Definition at line 90 of file _deque.h.

90{ return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }

◆ end() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::end ( )
inline

Definition at line 128 of file _deque.h.

128{ return ite_cast_traits::to_value_type_ite(_M_impl.end()); }

◆ end() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::end ( ) const
inline

Definition at line 435 of file _deque.h.

435{ return const_iterator(this->_M_finish); }

◆ end() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::end ( ) const
inline

Definition at line 92 of file _deque.h.

◆ end() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_iterator deque< _Tp, >::end ( ) const
inline

Definition at line 130 of file _deque.h.

130{ return ite_cast_traits::to_value_type_cite(_M_impl.end()); }

◆ erase() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __first,
iterator  __last 
)
inline

Definition at line 841 of file _deque.h.

841 {
842#if !defined (_STLP_NO_MOVE_SEMANTIC)
843 typedef typename __move_traits<_Tp>::implemented _Movable;
844#endif
845 if (__first == this->_M_start && __last == this->_M_finish) {
846 clear();
847 return this->_M_finish;
848 }
849 else {
850 if (__first == __last)
851 return __first;
852 return _M_erase(__first, __last, _Movable());
853 }
854 }
void clear()
Definition: _deque.c:346
iterator _M_erase(iterator __pos, const __true_type &)
Definition: _deque.c:208

◆ erase() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __first,
iterator  __last 
)
inline

Definition at line 388 of file _deque.h.

388 {
389 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
390 if (!empty()) {
391 if (__first._M_iterator == _M_non_dbg_impl.begin() ||
392 __last._M_iterator == _M_non_dbg_impl.end())
394 else
396 }
397 return iterator (&_M_iter_list, _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator));
398 }
void _Invalidate_iterators(const iterator &__first, const iterator &__last)
Definition: _deque.h:82

◆ erase() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __first,
iterator  __last 
)
inline

Definition at line 365 of file _deque.h.

366 { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__first),
367 ite_cast_traits::to_storage_type_ite(__last))); }

◆ erase() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __pos)
inline

Definition at line 835 of file _deque.h.

835 {
836#if !defined (_STLP_NO_MOVE_SEMANTIC)
837 typedef typename __move_traits<_Tp>::implemented _Movable;
838#endif
839 return _M_erase(__pos, _Movable());
840 }

Referenced by deque< _Tp, >::_M_fill_assign(), deque< _Tp, >::assign(), MoveConstructorTest::deque_test(), DequeTest::erase(), MoveConstructorTest::move_traits_deq(), MoveConstructorTest::move_traits_deq_complete(), and deque< _Tp, >::resize().

◆ erase() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __pos)
inline

Definition at line 373 of file _deque.h.

373 {
374 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
376 if (__pos._M_iterator == _M_non_dbg_impl.begin()) {
378 } else {
379 typename _Base::iterator tmp = --(_M_non_dbg_impl.end());
380 if (__pos._M_iterator == tmp)
382 else
384 }
385 return iterator (&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
386 }
void _Invalidate_iterator(const iterator &__it)
Definition: _deque.h:80
bool _Dereferenceable(const _Iterator &__it)
Definition: _iterator.h:93

◆ erase() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::erase ( iterator  __pos)
inline

Definition at line 362 of file _deque.h.

363 { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__pos))); }

◆ front() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::front ( )
inline

Definition at line 458 of file _deque.h.

458{ return *this->_M_start; }

Referenced by MoveConstructorTest::deque_test(), and BtrfsPropSheet::search_list_thread().

◆ front() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::front ( )
inline

Definition at line 111 of file _deque.h.

111 {
112 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
113 return *begin();
114 }

◆ front() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::front ( )
inline

Definition at line 149 of file _deque.h.

149{ return cast_traits::to_value_type_ref(_M_impl.front()); }

◆ front() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::front ( ) const
inline

Definition at line 464 of file _deque.h.

464{ return *this->_M_start; }

◆ front() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::front ( ) const
inline

Definition at line 115 of file _deque.h.

115 {
116 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
117 return *begin();
118 }

◆ front() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::front ( ) const
inline

Definition at line 151 of file _deque.h.

151{ return cast_traits::to_value_type_cref(_M_impl.front()); }

◆ get_allocator() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
allocator_type deque< _Tp, >::get_allocator ( ) const
inline

Definition at line 474 of file _deque.h.

474{ return this->_M_map_size; }

◆ get_allocator() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
allocator_type deque< _Tp, >::get_allocator ( ) const
inline

Definition at line 87 of file _deque.h.

87{ return _M_non_dbg_impl.get_allocator(); }

◆ get_allocator() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
allocator_type deque< _Tp, >::get_allocator ( ) const
inline

Definition at line 157 of file _deque.h.

157{ return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }

◆ insert() [1/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::insert ( iterator  __pos,
const value_type __x = _STLP_DEFAULT_CONSTRUCTED(_Tp) 
)
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 730 of file _deque.h.

730 {
731#else
732 iterator insert(iterator __pos, const value_type& __x) {
733#endif
734#if !defined (_STLP_NO_MOVE_SEMANTIC)
735 typedef typename __move_traits<_Tp>::implemented _Movable;
736#endif
737 if (__pos._M_cur == this->_M_start._M_cur) {
738 push_front(__x);
739 return this->_M_start;
740 }
741 else if (__pos._M_cur == this->_M_finish._M_cur) {
742 push_back(__x);
743 iterator __tmp = this->_M_finish;
744 --__tmp;
745 return __tmp;
746 }
747 else {
748 return _M_fill_insert_aux(__pos, 1, __x, _Movable());
749 }
750 }
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:668
void push_front(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:680

Referenced by MoveConstructorTest::deque_test(), MoveConstructorTest::move_traits_deq(), MoveConstructorTest::move_traits_deq_complete(), DequeTest::optimizations_check(), and PtrSpecTest::ptr_specialization_test().

◆ insert() [2/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::insert ( iterator  __pos,
const value_type __x = _STLP_DEFAULT_CONSTRUCTED(value_type) 
)
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 289 of file _deque.h.

293 { return ite_cast_traits::to_value_type_ite(_M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
294 cast_traits::to_storage_type_cref(__x))); }

◆ insert() [3/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
iterator deque< _Tp, >::insert ( iterator  __pos,
const value_type __x = _Tp() 
)
inline

Definition at line 286 of file _deque.h.

286 {
287#else
288 iterator insert(iterator __pos, const value_type& __x) {
289#endif
290 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
292 return iterator(&_M_iter_list, _M_non_dbg_impl.insert(__pos._M_iterator, __x));
293 }

◆ insert() [4/13]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::insert ( iterator  __pos,
const value_type __first,
const value_type __last 
)

Definition at line 150 of file _deque.c.

151 {
152#if !defined (_STLP_NO_MOVE_SEMANTIC)
153 typedef typename __move_traits<_Tp>::implemented _Movable;
154#endif
155 size_type __n = __last - __first;
156 if (__pos._M_cur == this->_M_start._M_cur) {
158 _STLP_TRY {
159 _STLP_PRIV __ucopy(__first, __last, __new_start);
160 }
161 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
162 this->_M_start = __new_start;
163 }
164 else if (__pos._M_cur == this->_M_finish._M_cur) {
166 _STLP_TRY {
167 _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
168 }
169 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
170 __new_finish._M_node + 1))
171 this->_M_finish = __new_finish;
172 }
173 else
174 _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
175}
void _M_insert_range_aux(iterator __pos, const value_type *__first, const value_type *__last, size_type __n, const __true_type &)
Definition: _deque.c:562

◆ insert() [5/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
const value_type __first,
const value_type __last 
)
inline

Definition at line 323 of file _deque.h.

324 {
325 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
326 _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
327 if (__first != __last) _Invalidate_all();
328 _M_non_dbg_impl.insert(__pos._M_iterator, __first, __last);
329 }

◆ insert() [6/13]

template<class _Tp , class _Alloc >
void deque< _Tp, _Alloc >::insert ( iterator  __pos,
const_iterator  __first,
const_iterator  __last 
)

Definition at line 178 of file _deque.c.

179 {
180#if !defined (_STLP_NO_MOVE_SEMANTIC)
181 typedef typename __move_traits<_Tp>::implemented _Movable;
182#endif
183 size_type __n = __last - __first;
184 if (__pos._M_cur == this->_M_start._M_cur) {
186 _STLP_TRY {
187 _STLP_PRIV __ucopy(__first, __last, __new_start);
188 }
189 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
190 this->_M_start = __new_start;
191 }
192 else if (__pos._M_cur == this->_M_finish._M_cur) {
194 _STLP_TRY {
195 _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
196 }
197 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
198 __new_finish._M_node + 1))
199 this->_M_finish = __new_finish;
200 }
201 else
202 _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
203}

◆ insert() [7/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 333 of file _deque.h.

334 {
335 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
336 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
337 //Sequence requirements 23.1.1 Table 67:
338 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
339 if (__first != __last) _Invalidate_all();
340 _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
341 }

◆ insert() [8/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 342 of file _deque.h.

343 {
344 _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
345 ite_cast_traits::to_storage_type_cite(__first),
346 ite_cast_traits::to_storage_type_cite(__last));
347 }

◆ insert() [9/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
const_pointer  __first,
const_pointer  __last 
)
inline

Definition at line 336 of file _deque.h.

337 {
338 _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
339 cast_traits::to_storage_type_cptr(__first),
340 cast_traits::to_storage_type_cptr(__last));
341 }

◆ insert() [10/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
iterator  __first,
iterator  __last 
)
inline

Definition at line 343 of file _deque.h.

344 {
345 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
346 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
347 //Sequence requirements 23.1.1 Table 67:
348 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
349 if (__first != __last) _Invalidate_all();
350 _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
351 }

◆ insert() [11/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
size_type  __n,
const value_type __x 
)
inline

Definition at line 757 of file _deque.h.

758 { _M_fill_insert(__pos, __n, __x); }
void _M_fill_insert(iterator __pos, size_type __n, const value_type &__x)
Definition: _deque.c:122

◆ insert() [12/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
size_type  __n,
const value_type __x 
)
inline

Definition at line 303 of file _deque.h.

303 {
304 _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
305 if (__n != 0) _Invalidate_all();
306 _M_non_dbg_impl.insert(__pos._M_iterator, __n, __x);
307 }

◆ insert() [13/13]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::insert ( iterator  __pos,
size_type  __n,
const value_type __x 
)
inline

Definition at line 300 of file _deque.h.

301 { _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __n, cast_traits::to_storage_type_cref(__x)); }

◆ max_size() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
size_type deque< _Tp, >::max_size ( ) const
inline

Definition at line 472 of file _deque.h.

472{ return size_type(-1); }

◆ max_size() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
size_type deque< _Tp, >::max_size ( ) const
inline

Definition at line 201 of file _deque.h.

201{ return _M_non_dbg_impl.max_size(); }

◆ max_size() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
size_type deque< _Tp, >::max_size ( ) const
inline

Definition at line 155 of file _deque.h.

155{ return _M_impl.max_size(); }

◆ operator=() [1/3]

template<class _Tp , class _Alloc >
deque< _Tp, _Alloc > & deque< _Tp, _Alloc >::operator= ( const _Self __x)

Definition at line 107 of file _deque.c.

107 {
108 const size_type __len = size();
109 if (&__x != this) {
110 if (__len >= __x.size())
111 erase(_STLP_STD::copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish);
112 else {
113 const_iterator __mid = __x.begin() + difference_type(__len);
114 _STLP_STD::copy(__x.begin(), __mid, this->_M_start);
115 insert(this->_M_finish, __mid, __x.end());
116 }
117 }
118 return *this;
119}

◆ operator=() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
_Self & deque< _Tp, >::operator= ( const _Self __x)
inline

Definition at line 191 of file _deque.h.

191 {
192 if (this != &__x) {
194 _M_non_dbg_impl = __x._M_non_dbg_impl;
195 }
196 return *this;
197 }

◆ operator=() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
_Self & deque< _Tp, >::operator= ( const _Self __x)
inline

Definition at line 220 of file _deque.h.

220{ _M_impl = __x._M_impl; return *this; }

◆ operator[]() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::operator[] ( size_type  __n)
inline

Definition at line 444 of file _deque.h.

445 { return this->_M_start[difference_type(__n)]; }

◆ operator[]() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::operator[] ( size_type  __n)
inline

Definition at line 99 of file _deque.h.

99 {
100 _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
101 return _M_non_dbg_impl[__n];
102 }

◆ operator[]() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reference deque< _Tp, >::operator[] ( size_type  __n)
inline

Definition at line 139 of file _deque.h.

140 { return cast_traits::to_value_type_ref(_M_impl[__n]); }

◆ operator[]() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::operator[] ( size_type  __n) const
inline

Definition at line 446 of file _deque.h.

447 { return this->_M_start[difference_type(__n)]; }

◆ operator[]() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::operator[] ( size_type  __n) const
inline

Definition at line 103 of file _deque.h.

103 {
104 _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
105 return _M_non_dbg_impl[__n];
106 }

◆ operator[]() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reference deque< _Tp, >::operator[] ( size_type  __n) const
inline

Definition at line 141 of file _deque.h.

142 { return cast_traits::to_value_type_cref(_M_impl[__n]); }

◆ pop_back() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_back ( )
inline

Definition at line 711 of file _deque.h.

711 {
712 if (this->_M_finish._M_cur != this->_M_finish._M_first) {
713 --this->_M_finish._M_cur;
714 _STLP_STD::_Destroy(this->_M_finish._M_cur);
715 }
716 else {
718 _STLP_STD::_Destroy(this->_M_finish._M_cur);
719 }
720 }

◆ pop_back() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_back ( )
inline

Definition at line 271 of file _deque.h.

271 {
272 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
274 _M_non_dbg_impl.pop_back();
275 }

◆ pop_back() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_back ( )
inline

Definition at line 285 of file _deque.h.

285{ _M_impl.pop_back(); }

◆ pop_front() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_front ( )
inline

Definition at line 722 of file _deque.h.

722 {
723 _STLP_STD::_Destroy(this->_M_start._M_cur);
725 }

Referenced by BtrfsPropSheet::search_list_thread().

◆ pop_front() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_front ( )
inline

Definition at line 277 of file _deque.h.

277 {
278 _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
280 _M_non_dbg_impl.pop_front();
281 }

◆ pop_front() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::pop_front ( )
inline

Definition at line 286 of file _deque.h.

286{ _M_impl.pop_front(); }

◆ push_back() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_back ( const value_type __t = _STLP_DEFAULT_CONSTRUCTED(_Tp))
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 668 of file _deque.h.

668 {
669#else
670 void push_back(const value_type& __t) {
671#endif
672 if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
673 _Copy_Construct(this->_M_finish._M_cur, __t);
674 ++this->_M_finish._M_cur;
675 }
676 else
678 }
void _M_push_back_aux_v(const value_type &)
Definition: _deque.c:382

Referenced by DequeTest::auto_ref(), BtrfsPropSheet::check_file(), BtrfsPropSheet::do_search(), DequeTest::erase(), deque< _Tp, >::insert(), MoveConstructorTest::move_traits_deq(), MoveConstructorTest::move_traits_deq_complete(), deque< _Tp, >::push_back(), deque< _Tp, >::push_front(), StringTest::replace(), BtrfsPropSheet::set_cmdline(), and AlgTest::sort_test().

◆ push_back() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_back ( const value_type __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 267 of file _deque.h.

271 { _M_impl.push_back(cast_traits::to_storage_type_cref(__t)); }

◆ push_back() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_back ( const value_type __t = _Tp())
inline

Definition at line 240 of file _deque.h.

240 {
241#else
242 void push_back(const value_type& __t) {
243#endif
245 _M_non_dbg_impl.push_back(__t);
246 }

◆ push_front() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_front ( const value_type __t = _STLP_DEFAULT_CONSTRUCTED(_Tp))
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 680 of file _deque.h.

680 {
681#else
682 void push_front(const value_type& __t) {
683#endif
684 if (this->_M_start._M_cur != this->_M_start._M_first) {
685 _Copy_Construct(this->_M_start._M_cur - 1, __t);
686 --this->_M_start._M_cur;
687 }
688 else
690 }
void _M_push_front_aux_v(const value_type &)
Definition: _deque.c:412

Referenced by DequeTest::erase(), deque< _Tp, >::insert(), and deque< _Tp, >::push_front().

◆ push_front() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_front ( const value_type __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
inline

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Definition at line 274 of file _deque.h.

278 { _M_impl.push_front(cast_traits::to_storage_type_cref(__t)); }

◆ push_front() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::push_front ( const value_type __t = _Tp())
inline

Definition at line 256 of file _deque.h.

256 {
257#else
258 void push_front(const value_type& __t) {
259#endif
261 _M_non_dbg_impl.push_front(__t);
262 }

◆ rbegin() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rbegin ( )
inline

Definition at line 437 of file _deque.h.

437{ return reverse_iterator(this->_M_finish); }
#define reverse_iterator
Definition: _abbrevs.h:34

◆ rbegin() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rbegin ( )
inline

Definition at line 94 of file _deque.h.

94{ return reverse_iterator(end()); }

◆ rbegin() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rbegin ( )
inline

Definition at line 132 of file _deque.h.

132{ return reverse_iterator(end()); }

◆ rbegin() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rbegin ( ) const
inline

Definition at line 439 of file _deque.h.

440 { return const_reverse_iterator(this->_M_finish); }

◆ rbegin() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rbegin ( ) const
inline

Definition at line 96 of file _deque.h.

96{ return const_reverse_iterator(end()); }

◆ rbegin() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rbegin ( ) const
inline

Definition at line 134 of file _deque.h.

135 { return const_reverse_iterator(end()); }

◆ rend() [1/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rend ( )
inline

Definition at line 438 of file _deque.h.

438{ return reverse_iterator(this->_M_start); }

◆ rend() [2/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rend ( )
inline

Definition at line 95 of file _deque.h.

95{ return reverse_iterator(begin()); }

◆ rend() [3/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
reverse_iterator deque< _Tp, >::rend ( )
inline

Definition at line 133 of file _deque.h.

133{ return reverse_iterator(begin()); }

◆ rend() [4/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rend ( ) const
inline

Definition at line 441 of file _deque.h.

442 { return const_reverse_iterator(this->_M_start); }

◆ rend() [5/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rend ( ) const
inline

Definition at line 97 of file _deque.h.

97{ return const_reverse_iterator(begin()); }

◆ rend() [6/6]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
const_reverse_iterator deque< _Tp, >::rend ( ) const
inline

Definition at line 136 of file _deque.h.

137 { return const_reverse_iterator(begin()); }

◆ resize() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::resize ( size_type  __new_size,
const value_type __x = _STLP_DEFAULT_CONSTRUCTED(_Tp) 
)
inline

Definition at line 811 of file _deque.h.

812 {
813#else
814 void resize(size_type __new_size, const value_type& __x) {
815#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
816 const size_type __len = size();
817 if (__new_size < __len)
818 erase(this->_M_start + __new_size, this->_M_finish);
819 else
820 insert(this->_M_finish, __new_size - __len, __x);
821 }
void resize(size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:811

Referenced by deque< _Tp, >::resize().

◆ resize() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::resize ( size_type  __new_size,
const value_type __x = _STLP_DEFAULT_CONSTRUCTED(value_type) 
)
inline

Definition at line 352 of file _deque.h.

356 { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x)); }

◆ resize() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::resize ( size_type  __new_size,
const value_type __x = _Tp() 
)
inline

Definition at line 355 of file _deque.h.

355 {
356#else
357 void resize(size_type __new_size, const value_type& __x) {
358#endif
359 if (__new_size != size()) {
360 if ((__new_size > size()) || (__new_size < size() - 1))
362 else
364 }
365 _M_non_dbg_impl.resize(__new_size, __x);
366 }

◆ size() [1/3]

◆ size() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
size_type deque< _Tp, >::size ( ) const
inline

Definition at line 200 of file _deque.h.

200{ return _M_non_dbg_impl.size(); }

◆ size() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
size_type deque< _Tp, >::size ( ) const
inline

Definition at line 154 of file _deque.h.

154{ return _M_impl.size(); }

◆ swap() [1/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::swap ( _Self __x)
inline

Definition at line 571 of file _deque.h.

571 {
572 _STLP_STD::swap(this->_M_start, __x._M_start);
573 _STLP_STD::swap(this->_M_finish, __x._M_finish);
574 this->_M_map.swap(__x._M_map);
575 this->_M_map_size.swap(__x._M_map_size);
576 }

◆ swap() [2/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::swap ( _Self __x)
inline

Definition at line 203 of file _deque.h.

203 {
204 _M_iter_list._Swap_owners(__x._M_iter_list);
205 _M_non_dbg_impl.swap(__x._M_non_dbg_impl);
206 }

◆ swap() [3/3]

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
void deque< _Tp, >::swap ( _Self __x)
inline

Definition at line 222 of file _deque.h.

222{ _M_impl.swap(__x._M_impl); }

Member Data Documentation

◆ _M_impl

◆ _M_iter_list

◆ _M_non_dbg_impl

◆ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

template<class _Tp , _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) >
deque< _Tp, >::_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

Definition at line 423 of file _deque.h.


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