19720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
29720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 2003
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_SLIST_H
219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_SPECIALIZED_SLIST_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
299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define SLIST_IMPL _STLP_PTR_IMPL_NAME(slist)
309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
31e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (__BORLANDC__) || defined (__DMC__)
32e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define typename
33e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
34e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_PRIV_NAMESPACE
379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _Slist_node<void*>;
399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktypedef _Slist_node<void*> _VoidPtrSNode;
409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<_Slist_node_base, _VoidPtrSNode, allocator<_VoidPtrSNode> >;
419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS _Slist_base<void*, allocator<void*> >;
429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_EXPORT_TEMPLATE_CLASS SLIST_IMPL<void*, allocator<void*> >;
439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_STD_NAMESPACE
459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEBUG)
489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define slist _STLP_NON_DBG_NAME(slist)
499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_PRIV_NAMESPACE
509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
52e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scotttemplate <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass slist
549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (slist)
559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block             : public __stlport_class<slist<_Tp, _Alloc> >
569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{
58e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott  typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type _StorageType;
599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV SLIST_IMPL<_StorageType, _StorageTypeAlloc> _Base;
619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Base::iterator _BaseIte;
629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Base::const_iterator _BaseConstIte;
639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef slist<_Tp, _Alloc> _Self;
649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _Slist_node_base _Node_base;
669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _Tp               value_type;
699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef value_type*       pointer;
709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef const value_type* const_pointer;
719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef value_type&       reference;
729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef const value_type& const_reference;
739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef size_t            size_type;
749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef ptrdiff_t         difference_type;
759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef forward_iterator_tag _Iterator_category;
769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _Slist_iterator<value_type, _Nonconst_traits<value_type> >  iterator;
789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_PRIV _Slist_iterator<value_type, _Const_traits<value_type> >     const_iterator;
799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  allocator_type get_allocator() const
859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit slist(const allocator_type& __a = allocator_type())
889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit slist(size_type __n, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type),
929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(size_type __n, const value_type& __x,
949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a =  allocator_type())
969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__n, cast_traits::to_storage_type_cref(__x), _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_DONT_SUP_DFLT_PARAM)
999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  explicit slist(size_type __n) : _M_impl(__n) {}
1009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
1039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  // We don't need any dispatching tricks here, because _M_insert_after_range
1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  // already does them.
1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(_InputIterator __first, _InputIterator __last,
1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
1089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_USE_ITERATOR_WRAPPER)
1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__first, __last, _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    insert_after(before_begin(), __first, __last);
1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  // VC++ needs this crazyness
1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(_InputIterator __first, _InputIterator __last)
1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if !defined (_STLP_USE_WRAPPER_ITERATOR)
1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__first, __last) {}
1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    else
1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { insert_after(before_begin(), __first, __last); }
1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_MEMBER_TEMPLATES */
1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(const_iterator __first, const_iterator __last,
1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a =  allocator_type() )
1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(_BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node),
1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(const value_type* __first, const value_type* __last,
1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        const allocator_type& __a =  allocator_type())
1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(cast_traits::to_storage_type_cptr(__first), cast_traits::to_storage_type_cptr(__last),
1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block              _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
1349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(const _Self& __x) : _M_impl(__x._M_impl) {}
137e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
138e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC)
1399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  slist(__move_source<_Self> src)
1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
141e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _Self& operator= (const _Self& __x) { _M_impl = __x._M_impl; return *this; }
1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(size_type __n, const value_type& __val)
1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val)); }
1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
1499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
1509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
1519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Integer>
1529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_assign_dispatch(_Integer __n, _Integer __val,
1539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __true_type&)
1549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.assign(__n, __val); }
1559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __false_type&) {
159e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott    _M_impl.assign(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
160e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                   _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
1649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
1659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(_InputIterator __first, _InputIterator __last) {
1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_assign_dispatch(__first, __last, _Integral());
1719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
1729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.assign(__first, __last);
1739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(const value_type *__first, const value_type *__last) {
1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   cast_traits::to_storage_type_cptr(__last));
1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void assign(const_iterator __first, const_iterator __last) {
1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.assign(_BaseConstIte(__first._M_node),
1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   _BaseConstIte(__last._M_node));
1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator before_begin()             { return iterator(_M_impl.before_begin()._M_node); }
1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator before_begin() const { return const_iterator(const_cast<_Node_base*>(_M_impl.before_begin()._M_node)); }
1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator begin()                    { return iterator(_M_impl.begin()._M_node); }
1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator begin() const        { return const_iterator(const_cast<_Node_base*>(_M_impl.begin()._M_node));}
1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator end()                      { return iterator(_M_impl.end()._M_node); }
1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator end() const          { return iterator(_M_impl.end()._M_node); }
1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  size_type size() const      { return _M_impl.size(); }
1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  size_type max_size() const  { return _M_impl.max_size(); }
1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  bool empty() const          { return _M_impl.empty(); }
1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void swap(_Self& __x) { _M_impl.swap(__x._M_impl); }
200e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
201e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott  void _M_swap_workaround(_Self& __x) { swap(__x); }
202e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  reference front()             { return *begin(); }
2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_reference front() const { return *begin(); }
2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front(const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front(const value_type& __x)
2119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.push_front(cast_traits::to_storage_type_cref(__x)); }
2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
2159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void push_front() { _M_impl.push_front();}
2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void pop_front() { _M_impl.pop_front(); }
2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator previous(const_iterator __pos)
2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.previous(_BaseConstIte(__pos._M_node))._M_node); }
2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  const_iterator previous(const_iterator __pos) const
2239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return const_iterator(const_cast<_Node_base*>(_M_impl.previous(_BaseConstIte(__pos._M_node))._M_node)); }
2249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert_after(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert_after(iterator __pos, const value_type& __x)
2299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
2309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.insert_after(_BaseIte(__pos._M_node),
2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                         cast_traits::to_storage_type_cref(__x))._M_node); }
2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_DONT_SUP_DFLT_PARAM)
2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert_after(iterator __pos)
2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.insert_after(_BaseIte(__pos._M_node))._M_node);}
2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert_after(iterator __pos, size_type __n, const value_type& __x)
2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert_after(_BaseIte(__pos._M_node), __n, cast_traits::to_storage_type_cref(__x)); }
2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
2429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
2439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Integer>
2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_after_dispatch(iterator __pos, _Integer __n, _Integer __val,
2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                const __true_type&) {
2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert_after(_BaseIte(__pos._M_node), __n, __val);
2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_after_dispatch(iterator __pos,
2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                _InputIterator __first, _InputIterator __last,
2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                const __false_type&) {
2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert_after(_BaseIte(__pos._M_node),
255e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                         _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
256e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                         _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert_after(iterator __pos, _InputIterator __first, _InputIterator __last) {
2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    // Check whether it's an integral type.  If so, it's not an iterator.
2669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_insert_after_dispatch(__pos, __first, __last, _Integral());
2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert_after(_BaseIte(__pos._M_node), __first, __last);
2709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_MEMBER_TEMPLATES */
2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert_after(iterator __pos,
2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                    const_iterator __first, const_iterator __last)
2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert_after(_BaseIte(__pos._M_node),
2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                         _BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert_after(iterator __pos,
2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                    const value_type* __first, const value_type* __last) {
2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert_after(_BaseIte(__pos._M_node),
2819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                         cast_traits::to_storage_type_cptr(__first),
2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                         cast_traits::to_storage_type_cptr(__last));
2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
2849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos, const value_type& __x)
2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.insert(_BaseIte(__pos._M_node),
2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                   cast_traits::to_storage_type_cref(__x))._M_node); }
2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_DONT_SUP_DFLT_PARAM)
2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator insert(iterator __pos)
2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.insert(_BaseIte(__pos._M_node))._M_node); }
2979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, size_type __n, const value_type& __x)
3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert(_BaseIte(__pos._M_node), __n, cast_traits::to_storage_type_cref(__x)); }
3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES)
3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Integer>
3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __true_type&) {
3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(_BaseIte(__pos._M_node), __n, __val);
3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
3129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void _M_insert_dispatch(iterator __pos,
3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          _InputIterator __first, _InputIterator __last,
3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                          const __false_type&) {
315e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott    _M_impl.insert(_BaseIte(__pos._M_node), _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
316e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott                                            _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
3179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic:
3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _InputIterator>
3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_ITERATOR_WRAPPER)
3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    // Check whether it's an integral type.  If so, it's not an iterator.
3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_insert_dispatch(__pos, __first, __last, _Integral());
3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _M_impl.insert(_BaseIte(__pos._M_node), __first, __last);
3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  }
3329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_MEMBER_TEMPLATES */
3349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, const_iterator __first, const_iterator __last)
3359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert(_BaseIte(__pos._M_node), _BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
3369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void insert(iterator __pos, const value_type* __first, const value_type* __last)
3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.insert(_BaseIte(__pos._M_node), cast_traits::to_storage_type_cptr(__first),
3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                            cast_traits::to_storage_type_cptr(__last)); }
3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase_after(iterator __pos)
3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.erase_after(_BaseIte(__pos._M_node))._M_node); }
3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase_after(iterator __before_first, iterator __last)
3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.erase_after(_BaseIte(__before_first._M_node),
3459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                                        _BaseIte(__last._M_node))._M_node); }
3469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase(iterator __pos)
3489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.erase(_BaseIte(__pos._M_node))._M_node); }
3499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  iterator erase(iterator __first, iterator __last)
3509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { return iterator(_M_impl.erase(_BaseIte(__first._M_node), _BaseIte(__last._M_node))._M_node); }
3519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
3539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
3549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size, const value_type& __x)
3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x));}
3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_DONT_SUP_DFLT_PARAM)
3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void resize(size_type __new_size) { _M_impl.resize(__new_size); }
3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void clear() { _M_impl.clear(); }
3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice_after(iterator __pos, _Self& __x,
3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                    iterator __before_first, iterator __before_last)
3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl,
3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                         _BaseIte(__before_first._M_node), _BaseIte(__before_last._M_node)); }
3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice_after(iterator __pos, _Self& __x, iterator __prev)
3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl, _BaseIte(__prev._M_node)); }
3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice_after(iterator __pos, _Self& __x)
3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl); }
3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice(iterator __pos, _Self& __x)
3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl); }
3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice(iterator __pos, _Self& __x, iterator __i)
3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl, _BaseIte(__i._M_node)); }
3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void splice(iterator __pos, _Self& __x, iterator __first, iterator __last)
3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl,
3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block                   _BaseIte(__first._M_node), _BaseIte(__last._M_node)); }
3809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void reverse() { _M_impl.reverse(); }
3829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void remove(const value_type& __val) { _M_impl.remove(cast_traits::to_storage_type_cref(__val)); }
3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void unique()                 { _M_impl.unique(); }
3859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void merge(_Self& __x)        { _M_impl.merge(__x._M_impl); }
3869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void sort()                   {_M_impl.sort(); }
3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_MEMBER_TEMPLATES
3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _Predicate>
3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void remove_if(_Predicate __pred)
3919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.remove_if(_STLP_PRIV _UnaryPredWrapper<_StorageType, _Tp, _Predicate>(__pred)); }
3929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _BinaryPredicate>
3949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void unique(_BinaryPredicate __pred)
3959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.unique(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _BinaryPredicate>(__pred)); }
3969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _StrictWeakOrdering>
3989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void merge(_Self& __x, _StrictWeakOrdering __comp)
3999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.merge(__x._M_impl, _STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
4009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  template <class _StrictWeakOrdering>
4029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  void sort(_StrictWeakOrdering __comp)
4039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  { _M_impl.sort(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
4049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */
4059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate:
4079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  _Base _M_impl;
4089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block};
4099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (slist)
4119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef slist
4129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_MOVE_TO_STD_NAMESPACE
4139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
4149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef SLIST_IMPL
4169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
417e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (__BORLANDC__) || defined (__DMC__)
418e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  undef typename
419e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
420e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
4219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_END_NAMESPACE
4229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_SPECIALIZED_SLIST_H */
4249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Local Variables:
4269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// mode:C++
4279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// End:
428