20#ifndef _STLP_SPECIALIZED_DEQUE_H
21#define _STLP_SPECIALIZED_DEQUE_H
23#ifndef _STLP_POINTERS_SPEC_TOOLS_H
33template <
class _StorageT,
class _ValueT>
77#define DEQUE_IMPL _STLP_PTR_IMPL_NAME(deque)
78#if defined (__BORLANDC__) || defined (__DMC__)
82#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
90#if defined (_STLP_DEBUG)
91# define deque _STLP_NON_DBG_NAME(deque)
96template <
class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
98#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (
deque)
135 {
return const_reverse_iterator(
end()); }
136 const_reverse_iterator
rend()
const
137 {
return const_reverse_iterator(
begin()); }
140 {
return cast_traits::to_value_type_ref(
_M_impl[
__n]); }
142 {
return cast_traits::to_value_type_cref(
_M_impl[
__n]); }
145 {
return cast_traits::to_value_type_ref(
_M_impl.at(
__n)); }
147 {
return cast_traits::to_value_type_cref(
_M_impl.at(
__n)); }
164#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
172#if defined (_STLP_DONT_SUP_DFLT_PARAM)
176#if defined (_STLP_MEMBER_TEMPLATES)
177 template <
class _InputIterator>
178 deque(_InputIterator __first, _InputIterator
__last,
180#if !defined (_STLP_USE_ITERATOR_WRAPPER)
186#if defined (_STLP_USE_ITERATOR_WRAPPER)
191# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
192 template <
class _InputIterator>
193 deque(_InputIterator __first, _InputIterator
__last)
194# if !defined (_STLP_USE_ITERATOR_WRAPPER)
215#if !defined (_STLP_NO_MOVE_SEMANTIC)
223#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
224 void _M_swap_workaround(
_Self& __x) {
swap(__x); }
231#if defined (_STLP_MEMBER_TEMPLATES)
232# if defined (_STLP_USE_ITERATOR_WRAPPER)
234 template <
class _Integer>
235 void _M_assign_dispatch(_Integer
__n, _Integer
__val,
239 template <
class _InputIterator>
240 void _M_assign_dispatch(_InputIterator __first, _InputIterator
__last,
248 template <
class _InputIterator>
249 void assign(_InputIterator __first, _InputIterator
__last) {
250# if defined (_STLP_USE_ITERATOR_WRAPPER)
252 _M_assign_dispatch(__first,
__last, _Integral());
259 {
_M_impl.assign(cast_traits::to_storage_type_cptr(__first),
260 cast_traits::to_storage_type_cptr(
__last)); }
262 {
_M_impl.assign(ite_cast_traits::to_storage_type_cite(__first),
263 ite_cast_traits::to_storage_type_cite(
__last)); }
266#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
271 {
_M_impl.push_back(cast_traits::to_storage_type_cref(__t)); }
273#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
278 {
_M_impl.push_front(cast_traits::to_storage_type_cref(__t)); }
280# if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
288#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
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))); }
296#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
301 {
_M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
__n, cast_traits::to_storage_type_cref(__x)); }
303#if defined (_STLP_MEMBER_TEMPLATES)
304# if defined (_STLP_USE_ITERATOR_WRAPPER)
306 template <
class _Integer>
309 _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
__n,
__val);
312 template <
class _InputIterator>
313 void _M_insert_dispatch(
iterator __pos,
314 _InputIterator __first, _InputIterator
__last,
316 _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
324 template <
class _InputIterator>
326# if defined (_STLP_USE_ITERATOR_WRAPPER)
329 _M_insert_dispatch(__pos, __first,
__last, _Integral());
331 _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __first,
__last);
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));
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));
351#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
356 {
_M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x)); }
358#if defined (_STLP_DONT_SUP_DFLT_PARAM)
363 {
return ite_cast_traits::to_value_type_ite(
_M_impl.erase(ite_cast_traits::to_storage_type_ite(__pos))); }
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))); }
380#if defined (__BORLANDC__) || defined (__DMC__)
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
#define _STLP_FORCE_ALLOCATORS(a, y)
#define _STLP_DEFAULT_CONSTRUCTED(_TTp)
void get(int argc, const char *argv[])
const_iterator end() const
const_reference back() const
void assign(size_type __n, const value_type &__val)
iterator erase(iterator __pos)
size_type max_size() const
reverse_iterator rbegin()
_Self & operator=(const _Self &__x)
_STLP_TYPENAME _STLP_PRIV _StorageType< _Tp >::_Type _StorageType
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
deque(const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
const_reverse_iterator rend() const
void push_front(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
deque(const allocator_type &__a=allocator_type())
_Base::const_iterator const_iterator
_Alloc_traits< _StorageType, _Alloc >::allocator_type _StorageTypeAlloc
const_reverse_iterator rbegin() const
const_reference front() const
deque(const_pointer __first, const_pointer __last, const allocator_type &__a=allocator_type())
deque< _Tp, _Alloc > _Self
void resize(size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(value_type))
iterator erase(iterator __first, iterator __last)
iterator insert(iterator __pos, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(value_type))
reference operator[](size_type __n)
const_reference operator[](size_type __n) const
deque(__move_source< _Self > src)
void assign(const_pointer __first, const_pointer __last)
deque(size_type __n, const value_type &__val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
_Base::allocator_type allocator_type
const value_type & const_reference
ptrdiff_t difference_type
_STLP_PRIV _Deque_base< _Tp, _Alloc > _Base
const_reference at(size_type __n) const
allocator_type get_allocator() const
void assign(size_type __n, const _Tp &__val)
void insert(iterator __pos, const_pointer __first, const_pointer __last)
_STLP_PRIV _DequeIteCast< _StorageType, _Tp > ite_cast_traits
const value_type * const_pointer
const_iterator begin() const
void insert(iterator __pos, size_type __n, const value_type &__x)
void push_front(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(value_type))
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(value_type))
void assign(const_iterator __first, const_iterator __last)
_STLP_PRIV _CastTraits< _StorageType, _Tp > cast_traits
reference at(size_type __n)
void resize(size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
_STLP_PRIV DEQUE_IMPL< _StorageType, _StorageTypeAlloc > _Base
void insert(iterator __pos, const_iterator __first, const_iterator __last)
random_access_iterator_tag _Iterator_category
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_ALLOCATOR_TYPE_DFL
#define _STLP_CLASS_DECLSPEC
#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Rebind_type::other allocator_type
static storage_type * to_storage_type_ptr(value_type *__ptr)
static value_type * to_value_type_ptr(storage_type *__ptr)
static value_type ** to_value_type_pptr(storage_type **__ptr)
static storage_type ** to_storage_type_pptr(value_type **__ptr)
_Deque_iterator< _ValueT, _Nonconst_traits< _ValueT > > iterator
static iterator to_value_type_ite(storage_iterator const &__ite)
static const_iterator to_value_type_cite(const_storage_iterator const &__ite)
_Deque_iterator< _StorageT, _Nonconst_traits< _StorageT > > storage_iterator
_Deque_iterator< _ValueT, _Const_traits< _ValueT > > const_iterator
static const_storage_iterator to_storage_type_cite(const_iterator const &__ite)
_CastTraits< _StorageT, _ValueT > cast_traits
static storage_iterator to_storage_type_ite(iterator const &__ite)
_Deque_iterator< _StorageT, _Const_traits< _StorageT > > const_storage_iterator