19720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
29720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 2004
39720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Francois Dumont
49720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *
59720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * This material is provided "as is", with absolutely no warranty expressed
69720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * or implied. Any use is at your own risk.
79720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *
89720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to use or copy this software for any purpose is hereby granted
99720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * without fee, provided the above notices are retained on all copies.
109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to modify the code and to distribute modified code is granted,
119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * provided the above notices are retained, and a notice that the code was
129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * modified is included with the above copyright notice.
139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *
149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* NOTE: This is an internal header file, included by other STL headers.
179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *   You should not attempt to use it directly.
189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_SPECIALIZED_DEQUE_H
219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_SPECIALIZED_DEQUE_H
229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_POINTERS_SPEC_TOOLS_H
249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  include <stl/pointers/_tools.h>
259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_BEGIN_NAMESPACE
289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_PRIV_NAMESPACE
299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * struct helper to cast deque iterators:
329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _StorageT, class _ValueT>
349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockstruct _DequeIteCast {
359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Deque_iterator<_ValueT, _Nonconst_traits<_ValueT> > iterator;
369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Deque_iterator<_ValueT, _Const_traits<_ValueT> >    const_iterator;
379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Deque_iterator<_StorageT, _Nonconst_traits<_StorageT> > storage_iterator;
389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Deque_iterator<_StorageT, _Const_traits<_StorageT> > const_storage_iterator;
399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _CastTraits<_StorageT, _ValueT> cast_traits;
409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  static iterator to_value_type_ite (storage_iterator const& __ite) {
429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    iterator tmp;
439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_cur = cast_traits::to_value_type_ptr(__ite._M_cur);
449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_first = cast_traits::to_value_type_ptr(__ite._M_first);
459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_last = cast_traits::to_value_type_ptr(__ite._M_last);
469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_node = cast_traits::to_value_type_pptr(__ite._M_node);
479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    return tmp;
489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  static storage_iterator to_storage_type_ite (iterator const& __ite) {
509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    storage_iterator tmp;
519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_cur = cast_traits::to_storage_type_ptr(__ite._M_cur);
529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_first = cast_traits::to_storage_type_ptr(__ite._M_first);
539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_last = cast_traits::to_storage_type_ptr(__ite._M_last);
549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_node = cast_traits::to_storage_type_pptr(__ite._M_node);
559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    return tmp;
569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  static const_iterator to_value_type_cite (const_storage_iterator const& __ite) {
599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    const_iterator tmp;
609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_cur = cast_traits::to_value_type_ptr(__ite._M_cur);
619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_first = cast_traits::to_value_type_ptr(__ite._M_first);
629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_last = cast_traits::to_value_type_ptr(__ite._M_last);
639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_node = cast_traits::to_value_type_pptr(__ite._M_node);
649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    return tmp;
659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  static const_storage_iterator to_storage_type_cite (const_iterator const& __ite) {
689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    const_storage_iterator tmp;
699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_cur = cast_traits::to_storage_type_ptr(__ite._M_cur);
709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_first = cast_traits::to_storage_type_ptr(__ite._M_first);
719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_last = cast_traits::to_storage_type_ptr(__ite._M_last);
729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    tmp._M_node = cast_traits::to_storage_type_pptr(__ite._M_node);
739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    return tmp;
749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block};
769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define DEQUE_IMPL _STLP_PTR_IMPL_NAME(deque)
78e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (__BORLANDC__) || defined (__DMC__)
79e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define typename
80e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<size_t, void*,  allocator<void*> >;
849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<void***, void**,  allocator<void**> >;
859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT template struct _STLP_CLASS_DECLSPEC _Deque_iterator<void*, _Nonconst_traits<void*> >;
869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _Deque_base<void*,allocator<void*> >;
879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS DEQUE_IMPL<void*,allocator<void*> >;
889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEBUG)
919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define deque _STLP_NON_DBG_NAME(deque)
929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_STD_NAMESPACE
949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
96e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scotttemplate <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass deque
989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (deque)
999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block            : public __stlport_class<deque<_Tp, _Alloc> >
1009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{
102e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott  typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type _StorageType;
1039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV DEQUE_IMPL<_StorageType, _StorageTypeAlloc> _Base;
1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef deque<_Tp, _Alloc> _Self;
1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
1089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _DequeIteCast<_StorageType, _Tp> ite_cast_traits;
1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Tp value_type;
1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef value_type* pointer;
1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef const value_type* const_pointer;
1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef value_type& reference;
1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef const value_type& const_reference;
1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef size_t size_type;
1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef ptrdiff_t difference_type;
1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef random_access_iterator_tag _Iterator_category;
1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _Deque_iterator<value_type, _Nonconst_traits<value_type> > iterator;
1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _Deque_iterator<value_type, _Const_traits<value_type> >    const_iterator;
1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:                         // Basic accessors
1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator begin() { return ite_cast_traits::to_value_type_ite(_M_impl.begin()); }
1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator end()   { return ite_cast_traits::to_value_type_ite(_M_impl.end()); }
1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator begin() const { return ite_cast_traits::to_value_type_cite(_M_impl.begin()); }
1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator end() const   { return ite_cast_traits::to_value_type_cite(_M_impl.end()); }
1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reverse_iterator rbegin() { return reverse_iterator(end()); }
1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reverse_iterator rend()   { return reverse_iterator(begin()); }
1349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reverse_iterator rbegin() const
1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return const_reverse_iterator(end()); }
1369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reverse_iterator rend() const
1379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return const_reverse_iterator(begin()); }
1389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reference operator[](size_type __n)
1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return cast_traits::to_value_type_ref(_M_impl[__n]); }
1419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reference operator[](size_type __n) const
1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return cast_traits::to_value_type_cref(_M_impl[__n]); }
1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reference at(size_type __n)
1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return cast_traits::to_value_type_ref(_M_impl.at(__n)); }
1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reference at(size_type __n) const
1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return cast_traits::to_value_type_cref(_M_impl.at(__n)); }
1489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reference front() { return cast_traits::to_value_type_ref(_M_impl.front()); }
1509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reference back()  { return cast_traits::to_value_type_ref(_M_impl.back()); }
1519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reference front() const { return cast_traits::to_value_type_cref(_M_impl.front()); }
1529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reference back() const  { return cast_traits::to_value_type_cref(_M_impl.back()); }
1539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  size_type size() const     { return _M_impl.size(); }
1559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  size_type max_size() const { return _M_impl.max_size(); }
1569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  bool empty() const         { return _M_impl.empty(); }
1579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  allocator_type get_allocator() const { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit deque(const allocator_type& __a = allocator_type())
1609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(const _Self& __x) : _M_impl(__x._M_impl) {}
1639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
1659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit deque(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(size_type __n, const value_type& __val,
1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a = allocator_type())
1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__n, cast_traits::to_storage_type_cref(__val), _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
1719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  // int,long variants may be needed
1729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DONT_SUP_DFLT_PARAM)
1739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit deque(size_type __n) : _M_impl(__n) {}
1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(_InputIterator __first, _InputIterator __last,
1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_USE_ITERATOR_WRAPPER)
1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  : _M_impl(__first, __last,
1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block            _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_ITERATOR_WRAPPER)
1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    insert(end(), __first, __last);
1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(_InputIterator __first, _InputIterator __last)
1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if !defined (_STLP_USE_ITERATOR_WRAPPER)
1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__first, __last) {}
1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    else
1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { insert(end(), __first, __last); }
1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(const_pointer __first, const_pointer __last,
2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a = allocator_type() )
2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(cast_traits::to_storage_type_cptr(__first),
2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              cast_traits::to_storage_type_cptr(__last),
2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(const_iterator __first, const_iterator __last,
2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a = allocator_type() )
2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(ite_cast_traits::to_storage_type_cite(__first),
2119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              ite_cast_traits::to_storage_type_cite(__last),
2129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
215e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC)
2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  deque(__move_source<_Self> src)
2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
218e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _Self& operator= (const _Self& __x) { _M_impl = __x._M_impl; return *this; }
2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void swap(_Self& __x) { _M_impl.swap(__x._M_impl); }
223e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
224e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott  void _M_swap_workaround(_Self& __x) { swap(__x); }
225e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(size_type __n, const value_type& __val) {
2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val));
2299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Integer>
2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_assign_dispatch(_Integer __n, _Integer __val,
2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __true_type&)
2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.assign(__n, __val); }
2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __false_type&) {
242e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott    _M_impl.assign(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
243e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                   _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(_InputIterator __first, _InputIterator __last) {
2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_assign_dispatch(__first, __last, _Integral());
2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.assign(__first, __last);
2559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(const_pointer __first, const_pointer __last)
2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   cast_traits::to_storage_type_cptr(__last)); }
2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(const_iterator __first, const_iterator __last)
2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.assign(ite_cast_traits::to_storage_type_cite(__first),
2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   ite_cast_traits::to_storage_type_cite(__last)); }
2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_back(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_back(const value_type& __t)
2709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.push_back(cast_traits::to_storage_type_cref(__t)); }
2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front(const value_type& __t)
2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.push_front(cast_traits::to_storage_type_cref(__t)); }
2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
2819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_back()  { _M_impl.push_back(); }
2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front() { _M_impl.push_front(); }
2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void pop_back()  { _M_impl.pop_back(); }
2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void pop_front() { _M_impl.pop_front(); }
2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
2899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos, const value_type& __x)
2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return ite_cast_traits::to_value_type_ite(_M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                                             cast_traits::to_storage_type_cref(__x))); }
2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
2979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos) { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, size_type __n, const value_type& __x)
3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __n, cast_traits::to_storage_type_cref(__x)); }
3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Integer>
3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __true_type&) {
3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __n, __val);
3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_dispatch(iterator __pos,
3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          _InputIterator __first, _InputIterator __last,
3159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __false_type&) {
3169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
317e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                   _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
318e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                   _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    // Check whether it's an integral type.  If so, it's not an iterator.
3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_insert_dispatch(__pos, __first, __last, _Integral());
3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __first, __last);
3329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_MEMBER_TEMPLATES */
3369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos,
3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              const_pointer __first, const_pointer __last) {
3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   cast_traits::to_storage_type_cptr(__first),
3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   cast_traits::to_storage_type_cptr(__last));
3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos,
3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              const_iterator __first, const_iterator __last) {
3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
3459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   ite_cast_traits::to_storage_type_cite(__first),
3469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   ite_cast_traits::to_storage_type_cite(__last));
3479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
3509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
3539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size, const value_type& __x)
3559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x)); }
3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DONT_SUP_DFLT_PARAM)
3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size) { _M_impl.resize(__new_size); }
3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase(iterator __pos)
3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__pos))); }
3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase(iterator __first, iterator __last)
3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__first),
3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                                            ite_cast_traits::to_storage_type_ite(__last))); }
3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void clear() { _M_impl.clear(); }
3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _Base _M_impl;
3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block};
3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (deque)
3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef deque
3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_STD_NAMESPACE
3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef DEQUE_IMPL
380e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (__BORLANDC__) || defined (__DMC__)
381e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  undef typename
382e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_END_NAMESPACE
3859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_SPECIALIZED_DEQUE_H */
3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Local Variables:
3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// mode:C++
3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// End:
391