30#ifndef _STLP_INTERNAL_SET_H
31#define _STLP_INTERNAL_SET_H
33#ifndef _STLP_INTERNAL_TREE_H
37#if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
44template <
class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
45 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
47#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
69 typedef typename _Rep_type::pointer
pointer;
88#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
89 explicit set(
const _Compare& __comp = _Compare(),
94 explicit set(
const _Compare& __comp)
98 :
_M_t(__comp, __a) {}
100#if defined (_STLP_MEMBER_TEMPLATES)
101 template <
class _InputIterator>
102 set(_InputIterator __first, _InputIterator
__last)
106# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
107 template <
class _InputIterator>
108 set(_InputIterator __first, _InputIterator
__last,
const _Compare& __comp)
111 template <
class _InputIterator>
112 set(_InputIterator __first, _InputIterator
__last,
const _Compare& __comp,
136#if !defined (_STLP_NO_MOVE_SEMANTIC)
163#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
164 void _M_swap_workaround(
_Self& __x) {
swap(__x); }
169 {
return _M_t.insert_unique(__x); }
171 {
return _M_t.insert_unique( __pos , __x); }
172#if defined (_STLP_MEMBER_TEMPLATES)
173 template <
class _InputIterator>
174 void insert(_InputIterator __first, _InputIterator
__last)
194 {
return _M_t.find(__x) ==
_M_t.end() ? 0 : 1 ; }
205 {
return _M_t.equal_range_unique(__x); }
208 {
return _M_t.equal_range_unique(__x); }
214template <
class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
215 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
217#
if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
257#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
258 explicit multiset(
const _Compare& __comp = _Compare(),
263 explicit multiset(
const _Compare& __comp)
267 :
_M_t(__comp, __a) {}
269#if defined (_STLP_MEMBER_TEMPLATES)
270 template <
class _InputIterator>
275 template <
class _InputIterator>
277 const _Compare& __comp,
280# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
281 template <
class _InputIterator>
283 const _Compare& __comp)
292 const _Compare& __comp,
301 const _Compare& __comp,
312#if !defined (_STLP_NO_MOVE_SEMANTIC)
334#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
335 void _M_swap_workaround(
_Self& __x) {
swap(__x); }
340 {
return _M_t.insert_equal(__x); }
342 {
return _M_t.insert_equal(__pos, __x); }
344#if defined (_STLP_MEMBER_TEMPLATES)
345 template <
class _InputIterator>
346 void insert(_InputIterator __first, _InputIterator
__last)
385#define _STLP_TEMPLATE_HEADER template <class _Key, class _Compare, class _Alloc>
386#define _STLP_TEMPLATE_CONTAINER set<_Key,_Compare,_Alloc>
388#undef _STLP_TEMPLATE_CONTAINER
389#define _STLP_TEMPLATE_CONTAINER multiset<_Key,_Compare,_Alloc>
391#undef _STLP_TEMPLATE_CONTAINER
392#undef _STLP_TEMPLATE_HEADER
394#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
395template <
class _Key,
class _Compare,
class _Alloc>
400template <
class _Key,
class _Compare,
class _Alloc>
_STLP_INLINE_LOOP _InputIter __last
#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
void erase(iterator __first, iterator __last)
void insert(const_iterator __first, const_iterator __last)
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
reverse_iterator rbegin()
_Rep_type::difference_type difference_type
multiset(const_iterator __first, const_iterator __last)
_Rep_type::const_pointer const_pointer
iterator insert(iterator __pos, const value_type &__x)
_STLP_TEMPLATE_FOR_CONT_EXT iterator lower_bound(const _KT &__x)
_Rep_type::const_reverse_iterator const_reverse_iterator
multiset(__move_source< _Self > src)
_Rep_type::allocator_type allocator_type
_STLP_TEMPLATE_FOR_CONT_EXT iterator upper_bound(const _KT &__x)
const_iterator begin() const
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
void erase(iterator __pos)
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)
_Rep_type::const_reference const_reference
void insert(const value_type *__first, const value_type *__last)
_Rep_type::reverse_iterator reverse_iterator
key_compare key_comp() const
allocator_type get_allocator() const
_Rep_type::iterator iterator
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator lower_bound(const _KT &__x) const
multiset< _Key, _Compare, _Alloc > _Self
multiset(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
_Rep_type::pointer pointer
_Rep_type::reference reference
const_reverse_iterator rbegin() const
multiset(const value_type *__first, const value_type *__last)
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator upper_bound(const _KT &__x) const
multiset(const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type())
value_compare value_comp() const
size_type erase(const key_type &__x)
_Rep_type::const_iterator const_iterator
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)
_Rep_type::reference reference
_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)
set(__move_source< _Self > src)
size_type max_size() const
iterator insert(iterator __pos, const value_type &__x)
const_reverse_iterator rend() const
const_iterator begin() const
void erase(iterator __pos)
_Rep_type::pointer pointer
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 _SetTraitsT< value_type > _SetTraits
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator > equal_range(const _KT &__x) const
_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
pair< iterator, bool > insert(const value_type &__x)
const_reverse_iterator rbegin() const
set(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
_Rep_type::const_pointer const_pointer
_Rep_type::const_reverse_iterator const_reverse_iterator
reverse_iterator rbegin()
allocator_type get_allocator() const
_Rep_type::allocator_type allocator_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
set(const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type())
_Self & operator=(const _Self &__x)
_Rep_type::const_reference const_reference
_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)
size_type erase(const key_type &__x)
_Rep_type::iterator iterator
#define _STLP_TEMPLATE_FOR_CONT_EXT
#define _STLP_ALLOCATOR_TYPE_DFL
#define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE