20#ifndef _STLP_PTR_SPECIALIZED_LIST_H
21#define _STLP_PTR_SPECIALIZED_LIST_H
23#ifndef _STLP_POINTERS_SPEC_TOOLS_H
29#define LIST_IMPL _STLP_PTR_IMPL_NAME(list)
30#if defined (__BORLANDC__) || defined (__DMC__)
34#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
53#if defined (_STLP_DEBUG)
54# define list _STLP_NON_DBG_NAME(list)
58template <
class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
60#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (
list)
95#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
101 : _M_impl(
__n, cast_traits::to_storage_type_cref(
__val),
104#if defined(_STLP_DONT_SUP_DFLT_PARAM)
109#if defined (_STLP_MEMBER_TEMPLATES)
110 template <
class _InputIterator>
111 list(_InputIterator __first, _InputIterator
__last,
113# if !defined (_STLP_USE_ITERATOR_WRAPPER)
121# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
122 template <
class _InputIterator>
123 list(_InputIterator __first, _InputIterator
__last)
124# if !defined (_STLP_USE_WRAPPER_ITERATOR)
125 : _M_impl(__first,
__last) {}
135 : _M_impl(
cast_traits::to_storage_type_cptr(__first),
147#if !defined (_STLP_NO_MOVE_SEMANTIC)
159 const_reverse_iterator
rbegin()
const {
return const_reverse_iterator(
end()); }
162 const_reverse_iterator
rend()
const {
return const_reverse_iterator(
begin()); }
164 bool empty()
const {
return _M_impl.empty(); }
174#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
175 void _M_swap_workaround(_Self& __x) {
swap(__x); }
179#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
185 cast_traits::to_storage_type_cref(__x))._M_node); }
187#if defined (_STLP_MEMBER_TEMPLATES)
188# if defined (_STLP_USE_ITERATOR_WRAPPER)
190 template <
class _Integer>
193 { _M_impl.insert(_BaseIte(__pos._M_node),
__n,
__val); }
195 template <
class _InputIterator>
196 void _M_insert_dispatch(
iterator __pos,
197 _InputIterator __first, _InputIterator
__last,
199 _M_impl.insert(_BaseIte(__pos._M_node),
207 template <
class _InputIterator>
209# if defined (_STLP_USE_ITERATOR_WRAPPER)
212 _M_insert_dispatch(__pos, __first,
__last, _Integral());
214 _M_impl.insert(_BaseIte(__pos._M_node), __first,
__last);
219 { _M_impl.insert(
_BaseIte(__pos._M_node), cast_traits::to_storage_type_cptr(__first),
220 cast_traits::to_storage_type_cptr(
__last)); }
226 { _M_impl.insert(
_BaseIte(__pos._M_node),
__n, cast_traits::to_storage_type_cref(__x)); }
231#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
233 void push_front() { _M_impl.push_front();}
234 void push_back() { _M_impl.push_back();}
242#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
245 void resize(
size_type __new_size) { _M_impl.resize(__new_size); }
246 void resize(size_type __new_size,
const value_type& __x)
248 {_M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x));}
254 { _M_impl = __x.
_M_impl;
return *
this; }
256 { _M_impl.assign(
__n, cast_traits::to_storage_type_cref(
__val)); }
258#if defined (_STLP_MEMBER_TEMPLATES)
259# if defined (_STLP_USE_ITERATOR_WRAPPER)
261 template <
class _Integer>
265 template <
class _InputIterator>
266 void _M_assign_dispatch(_InputIterator __first, _InputIterator
__last,
275 template <
class _InputIterator>
276 void assign(_InputIterator __first, _InputIterator
__last) {
277# if defined (_STLP_USE_ITERATOR_WRAPPER)
279 _M_assign_dispatch(__first,
__last, _Integral());
281 _M_impl.assign(__first,
__last);
286 _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
287 cast_traits::to_storage_type_cptr(
__last));
302 { _M_impl.remove(cast_traits::to_storage_type_cref(
__val)); }
306 void sort() { _M_impl.sort(); }
308#if defined (_STLP_MEMBER_TEMPLATES)
309 template <
class _Predicate>
312 template <
class _BinaryPredicate>
313 void unique(_BinaryPredicate __bin_pred)
316 template <
class _StrictWeakOrdering>
317 void merge(_Self &__x, _StrictWeakOrdering __comp)
320 template <
class _StrictWeakOrdering>
321 void sort(_StrictWeakOrdering __comp)
335#if defined (__BORLANDC__) || defined (__DMC__)
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result)
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter _Predicate __pred
_STLP_INLINE_LOOP _ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred)
_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[])
void insert(iterator __pos, size_type __n, const value_type &__x)
_STLP_PRIV LIST_IMPL< _StorageType, _StorageTypeAlloc > _Base
iterator erase(iterator __first, iterator __last)
const_reference back() const
const_reference front() const
void push_front(const value_type &__x)
list< _Tp, _Alloc > _Self
void splice(iterator __pos, _Self &__x)
_STLP_TYPENAME _STLP_PRIV _StorageType< _Tp >::_Type _StorageType
const value_type * const_pointer
iterator erase(iterator __pos)
_Alloc_traits< _StorageType, _Alloc >::allocator_type _StorageTypeAlloc
void remove(const_reference __val)
void resize(size_type __new_size, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(value_type))
void assign(const_iterator __first, const_iterator __last)
list(const value_type *__first, const value_type *__last, const allocator_type &__a=allocator_type())
_Base::allocator_type allocator_type
iterator insert(iterator __pos, const_reference __x=_STLP_DEFAULT_CONSTRUCTED(value_type))
void assign(const value_type *__first, const value_type *__last)
const_iterator end() const
const value_type & const_reference
void push_back(const value_type &__x)
_STLP_PRIV _CastTraits< _StorageType, _Tp > cast_traits
_STLP_PRIV _List_iterator< _Tp, _Const_traits< _Tp > > const_iterator
list(__move_source< _Self > src)
ptrdiff_t difference_type
const_reverse_iterator rbegin() const
void splice(iterator __pos, _Self &__x, iterator __i)
size_type max_size() const
void assign(size_type __n, const value_type &__val)
_STLP_PRIV _List_base< _Tp, _Alloc > _Base
const_iterator begin() const
const_reverse_iterator rend() const
list(const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
list(size_type __n, const value_type &__val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
void insert(iterator __pos, const value_type *__first, const value_type *__last)
reverse_iterator rbegin()
void insert(iterator __pos, const_iterator __first, const_iterator __last)
void splice(iterator __pos, _Self &__x, iterator __first, iterator __last)
_Base::const_iterator _BaseConstIte
_Self & operator=(const _Self &__x)
list(const allocator_type &__a=allocator_type())
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS
#define _STLP_ALLOCATOR_TYPE_DFL
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Rebind_type::other allocator_type