19#ifndef _STLP_PTR_SPECIALIZED_SET_H
20#define _STLP_PTR_SPECIALIZED_SET_H
22#ifndef _STLP_POINTERS_SPEC_TOOLS_H
28#if defined (__BORLANDC__) || defined (__DMC__)
35#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
43# if defined (_STLP_DEBUG)
45# define _Rb_tree _STLP_NON_DBG_NAME(Rb_tree)
55template <
class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
56 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
58#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
62#if !defined (__BORLANDC__)
100 typedef typename _Priv_Rep_type::pointer
pointer;
104 typedef typename _Priv_Rep_type::iterator
iterator;
116#if defined (_STLP_DEBUG)
118 {
return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
120 {
return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
130 explicit set(
const _Compare& __comp,
134#if defined (_STLP_MEMBER_TEMPLATES)
135 template <
class _InputIterator>
136 set(_InputIterator __first, _InputIterator
__last)
138# if defined (_STLP_USE_ITERATOR_WRAPPER)
146# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
147 template <
class _InputIterator>
148 set(_InputIterator __first, _InputIterator
__last,
const _Compare& __comp)
150# if defined (_STLP_USE_ITERATOR_WRAPPER)
158 template <
class _InputIterator>
159 set(_InputIterator __first, _InputIterator
__last,
const _Compare& __comp,
162# if defined (_STLP_USE_ITERATOR_WRAPPER)
172 _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
173 cast_traits::to_storage_type_cptr(
__last));
179 _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
180 cast_traits::to_storage_type_cptr(
__last));
195#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); }
235#if defined (_STLP_MEMBER_TEMPLATES)
236 template <
class _InputIterator>
237 void insert(_InputIterator __first, _InputIterator
__last) {
238# if defined (_STLP_USE_ITERATOR_WRAPPER)
249 _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
250 cast_traits::to_storage_type_cptr(
__last));
256 {
return _M_t.erase_unique(cast_traits::to_storage_type_cref(__x)); }
270 {
return _M_t.find(cast_traits::to_storage_type_crefT(__x)) ==
_M_t.end() ? 0 : 1; }
286 __ret =
_M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
293 __ret =
_M_t.equal_range_unique(cast_traits::to_storage_type_crefT(__x));
302template <
class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
303 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
305#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
309#if !defined (__BORLANDC__)
347 typedef typename _Priv_Rep_type::pointer
pointer;
351 typedef typename _Priv_Rep_type::iterator
iterator;
363#if defined (_STLP_DEBUG)
365 {
return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
367 {
return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
381#if defined (_STLP_MEMBER_TEMPLATES)
382 template <
class _InputIterator>
385# if defined (_STLP_USE_ITERATOR_WRAPPER)
393# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
394 template <
class _InputIterator>
396 const _Compare& __comp)
398# if defined (_STLP_USE_ITERATOR_WRAPPER)
406 template <
class _InputIterator>
408 const _Compare& __comp,
411# if defined (_STLP_USE_ITERATOR_WRAPPER)
422 _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
423 cast_traits::to_storage_type_cptr(
__last));
427 const _Compare& __comp,
430 _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
431 cast_traits::to_storage_type_cptr(
__last));
439 const _Compare& __comp,
453#if !defined (_STLP_NO_MOVE_SEMANTIC)
476#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
477 void _M_swap_workaround(
_Self& __x) {
swap(__x); }
485 cast_traits::to_storage_type_cref(__x)));
488#if defined (_STLP_MEMBER_TEMPLATES)
489 template <
class _InputIterator>
490 void insert(_InputIterator __first, _InputIterator
__last) {
491# if defined (_STLP_USE_ITERATOR_WRAPPER)
500 _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
501 cast_traits::to_storage_type_cptr(
__last));
510 {
return _M_t.erase(cast_traits::to_storage_type_cref(__x)); }
525 {
return _M_t.count(cast_traits::to_storage_type_crefT(__x)); }
541 __ret =
_M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
548 __ret =
_M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
554#if defined (__BORLANDC__) || defined (__DMC__)
_STLP_INLINE_LOOP _InputIter __last
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
#define _STLP_CREATE_ITERATOR_TRAITS(Motif, Traits)
void get(int argc, const char *argv[])
multiset(const _Self &__x)
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _MultisetTraits, _Alloc > _Rep_type
const_reverse_iterator rend() const
_Priv_Rep_type::reference reference
_Priv_Rep_type::iterator iterator
_AssocStorageTypes::_KeyStorageType _KeyStorageType
void erase(iterator __first, iterator __last)
void insert(const_iterator __first, const_iterator __last)
_Alloc_traits< _KeyStorageType, _Alloc >::allocator_type _StorageTypeAlloc
size_type max_size() const
_Rep_type::size_type size_type
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator > equal_range(const _KT &__x) const
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
const_iterator end() const
_Priv_Rep_type::const_reference const_reference
reverse_iterator rbegin()
_STLP_PRIV _CastTraits< _KeyStorageType, _Key > cast_traits
multiset(const _Compare &__comp, const allocator_type &__a=allocator_type())
multiset(const_iterator __first, const_iterator __last)
_Priv_Rep_type::allocator_type allocator_type
iterator insert(iterator __pos, const value_type &__x)
_STLP_TEMPLATE_FOR_CONT_EXT iterator lower_bound(const _KT &__x)
_Priv_Rep_type::reverse_iterator reverse_iterator
_Rep_type::const_reverse_iterator const_reverse_iterator
_Priv_Rep_type::const_pointer const_pointer
multiset(__move_source< _Self > src)
_Rep_type::allocator_type allocator_type
_STLP_TEMPLATE_FOR_CONT_EXT iterator upper_bound(const _KT &__x)
_AssocStorageTypes::_CompareStorageType _CompareStorageType
const_iterator begin() const
_Rep_type::iterator base_iterator
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
_Rep_type::const_iterator const_base_iterator
void erase(iterator __pos)
_Priv_Rep_type::const_iterator const_iterator
iterator insert(const value_type &__x)
multiset(const value_type *__first, const value_type *__last, const _Compare &__comp, const allocator_type &__a=allocator_type())
_Self & operator=(const _Self &__x)
_STLP_PRIV _MultisetTraitsT< value_type > _MultisetTraits
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator find(const _KT &__x) const
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator > equal_range(const _KT &__x)
void insert(const value_type *__first, const value_type *__last)
_STLP_PRIV _Rb_tree< _KeyStorageType, _CompareStorageType, _KeyStorageType, _STLP_PRIV _Identity< _KeyStorageType >, _MultisetStorageTraits, _StorageTypeAlloc > _Rep_type
_Rep_type::reverse_iterator reverse_iterator
key_compare key_comp() const
allocator_type get_allocator() const
_Rep_type::iterator iterator
_Priv_Rep_type::pointer pointer
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator lower_bound(const _KT &__x) const
multiset< _Key, _Compare, _Alloc > _Self
_STLP_PRIV _MultisetTraitsT< _KeyStorageType > _MultisetStorageTraits
multiset(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
_Priv_Rep_type::size_type size_type
const_reverse_iterator rbegin() const
_Priv_Rep_type::const_reverse_iterator const_reverse_iterator
multiset(const value_type *__first, const value_type *__last)
static base_iterator _S_to_storage_ite(const_iterator __ite)
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator upper_bound(const _KT &__x) const
_Priv_Rep_type::difference_type difference_type
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _MultisetTraits, _Alloc > _Priv_Rep_type
_STLP_PRIV _AssocStorageTypes< _Key, _Compare > _AssocStorageTypes
value_compare value_comp() const
size_type erase(const key_type &__x)
_Rep_type::const_iterator const_iterator
static iterator _S_to_value_ite(const_base_iterator __ite)
key_compare key_comp() const
set(const value_type *__first, const value_type *__last, const _Compare &__comp, const allocator_type &__a=allocator_type())
set(const_iterator __first, const_iterator __last)
void erase(iterator __first, iterator __last)
_Priv_Rep_type::allocator_type allocator_type
_Rep_type::reverse_iterator reverse_iterator
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator lower_bound(const _KT &__x) const
value_compare value_comp() const
_STLP_TEMPLATE_FOR_CONT_EXT iterator upper_bound(const _KT &__x)
_Priv_Rep_type::const_reference const_reference
_Priv_Rep_type::iterator iterator
set(__move_source< _Self > src)
_STLP_PRIV _AssocStorageTypes< _Key, _Compare > _AssocStorageTypes
size_type max_size() const
static base_iterator _S_to_storage_ite(const_iterator __ite)
_STLP_PRIV _CastTraits< _KeyStorageType, _Key > cast_traits
iterator insert(iterator __pos, const value_type &__x)
const_reverse_iterator rend() const
const_iterator begin() const
void erase(iterator __pos)
_STLP_PRIV _SetTraitsT< _KeyStorageType > _SetStorageTraits
_Priv_Rep_type::const_reverse_iterator const_reverse_iterator
void insert(const_iterator __first, const_iterator __last)
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator > equal_range(const _KT &__x)
_Rep_type::size_type size_type
const_iterator end() const
_STLP_PRIV _Rb_tree< _KeyStorageType, _CompareStorageType, _KeyStorageType, _STLP_PRIV _Identity< _KeyStorageType >, _SetStorageTraits, _StorageTypeAlloc > _Rep_type
_STLP_PRIV _SetTraitsT< value_type > _SetTraits
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator > equal_range(const _KT &__x) const
_Priv_Rep_type::difference_type difference_type
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _SetTraits, _Alloc > _Rep_type
set(const _Compare &__comp, const allocator_type &__a=allocator_type())
pair< iterator, bool > insert(const value_type &__x)
_AssocStorageTypes::_CompareStorageType _CompareStorageType
const_reverse_iterator rbegin() const
static iterator _S_to_value_ite(const_base_iterator __ite)
set(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
_Priv_Rep_type::const_iterator const_iterator
_Priv_Rep_type::const_pointer const_pointer
_Rep_type::iterator base_iterator
_Rep_type::const_reverse_iterator const_reverse_iterator
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _SetTraits, _Alloc > _Priv_Rep_type
reverse_iterator rbegin()
allocator_type get_allocator() const
_Rep_type::allocator_type allocator_type
_Priv_Rep_type::pointer pointer
_Priv_Rep_type::reference reference
_Priv_Rep_type::size_type size_type
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
_STLP_TEMPLATE_FOR_CONT_EXT iterator lower_bound(const _KT &__x)
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
_Rep_type::const_iterator const_iterator
_Priv_Rep_type::reverse_iterator reverse_iterator
_Self & operator=(const _Self &__x)
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator upper_bound(const _KT &__x) const
void insert(const value_type *__first, const value_type *__last)
set< _Key, _Compare, _Alloc > _Self
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator find(const _KT &__x) const
set(const value_type *__first, const value_type *__last)
_Rep_type::const_iterator const_base_iterator
size_type erase(const key_type &__x)
_AssocStorageTypes::_KeyStorageType _KeyStorageType
_Alloc_traits< _KeyStorageType, _Alloc >::allocator_type _StorageTypeAlloc
_Rep_type::iterator iterator
#define _STLP_TEMPLATE_FOR_CONT_EXT
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_ALLOCATOR_TYPE_DFL
#define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
#define _STLP_CLASS_DECLSPEC
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Rebind_type::other allocator_type
__select< is_default_less &&ptr_type, _BinaryPredWrapper< _KeyStorageType, _Tp, _Compare >, _Compare >::_Ret _CompareStorageType
__select< is_default_less, _SType, _Tp >::_Ret _KeyStorageType