19720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* 29720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 39720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 1994 49720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Hewlett-Packard Company 59720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 69720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 1996,1997 79720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Silicon Graphics Computer Systems, Inc. 89720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 99720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 1997 109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Moscow Center for SPARC Technology 119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 1999 139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Boris Fomitchev 149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * This material is provided "as is", with absolutely no warranty expressed 169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * or implied. Any use is at your own risk. 179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to use or copy this software for any purpose is hereby granted 199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * without fee, provided the above notices are retained on all copies. 209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to modify the code and to distribute modified code is granted, 219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * provided the above notices are retained, and a notice that the code was 229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * modified is included with the above copyright notice. 239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */ 259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* NOTE: This is an internal header file, included by other STL headers. 279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * You should not attempt to use it directly. 289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */ 299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_INTERNAL_SET_H 319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_INTERNAL_SET_H 329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_INTERNAL_TREE_H 349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# include <stl/_tree.h> 359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_USE_PTR_SPECIALIZATIONS) 389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_BEGIN_NAMESPACE 409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block//Specific iterator traits creation 429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_CREATE_ITERATOR_TRAITS(SetTraitsT, Const_traits) 439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>), 45e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) > 469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass set 479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : public __stlport_class<set<_Key, _Compare, _Alloc> > 499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ 519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef set<_Key, _Compare, _Alloc> _Self; 529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// typedefs: 549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Key key_type; 559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Key value_type; 569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Compare key_compare; 579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Compare value_compare; 589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Specific iterator traits creation 619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _SetTraitsT<value_type> _SetTraits; 629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Following typedef have to be public for __move_traits specialization. 659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _Rb_tree<key_type, key_compare, 669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block value_type, _STLP_PRIV _Identity<value_type>, 679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _SetTraits, _Alloc> _Rep_type; 689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::pointer pointer; 709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_pointer const_pointer; 719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::reference reference; 729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_reference const_reference; 739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::iterator iterator; 749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_iterator const_iterator; 759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::reverse_iterator reverse_iterator; 769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::size_type size_type; 789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::difference_type difference_type; 799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::allocator_type allocator_type; 809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Rep_type _M_t; // red-black tree representing set 839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // allocation/deallocation 889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) 899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit set(const _Compare& __comp = _Compare(), 909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set() 939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) {} 949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit set(const _Compare& __comp) 959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, allocator_type()) {} 969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const _Compare& __comp, const allocator_type& __a) 979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) {} 999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(_InputIterator __first, _InputIterator __last) 1039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(_InputIterator __first, _InputIterator __last, const _Compare& __comp) 1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, allocator_type()) { _M_t.insert_unique(__first, __last); } 1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(_InputIterator __first, _InputIterator __last, const _Compare& __comp, 1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); } 1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const value_type* __first, const value_type* __last) 1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const value_type* __first, 1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const value_type* __last, const _Compare& __comp, 1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); } 1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const_iterator __first, const_iterator __last) 1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const_iterator __first, const_iterator __last, const _Compare& __comp, 1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); } 1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */ 1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(const _Self& __x) : _M_t(__x._M_t) {} 1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 136e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC) 1379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block set(__move_source<_Self> src) 1389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {} 139e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Self& operator=(const _Self& __x) { 1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _M_t = __x._M_t; 1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return *this; 1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block } 1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // accessors: 1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block key_compare key_comp() const { return _M_t.key_comp(); } 1489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block value_compare value_comp() const { return _M_t.key_comp(); } 1499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block allocator_type get_allocator() const { return _M_t.get_allocator(); } 1509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator begin() { return _M_t.begin(); } 1529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator end() { return _M_t.end(); } 1539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator begin() const { return _M_t.begin(); } 1549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator end() const { return _M_t.end(); } 1559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block reverse_iterator rbegin() { return _M_t.rbegin(); } 1569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block reverse_iterator rend() { return _M_t.rend(); } 1579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_reverse_iterator rbegin() const { return _M_t.rbegin(); } 1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_reverse_iterator rend() const { return _M_t.rend(); } 1599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block bool empty() const { return _M_t.empty(); } 1609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type size() const { return _M_t.size(); } 1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_size() const { return _M_t.max_size(); } 1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void swap(_Self& __x) { _M_t.swap(__x._M_t); } 163e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 164e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott void _M_swap_workaround(_Self& __x) { swap(__x); } 165e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // insert/erase 1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator,bool> insert(const value_type& __x) 1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.insert_unique(__x); } 1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator insert(iterator __pos, const value_type& __x) 1719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.insert_unique( __pos , __x); } 1729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 1739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(_InputIterator __first, _InputIterator __last) 1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const_iterator __first, const_iterator __last) 1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const value_type* __first, const value_type* __last) 1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_unique(__first, __last); } 1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */ 1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __pos) { _M_t.erase( __pos ); } 1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type erase(const key_type& __x) { return _M_t.erase_unique(__x); } 1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last ); } 1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void clear() { _M_t.clear(); } 1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // set operations: 1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator find(const _KT& __x) const { return _M_t.find(__x); } 1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator find(const _KT& __x) { return _M_t.find(__x); } 1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type count(const _KT& __x) const 1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.find(__x) == _M_t.end() ? 0 : 1 ; } 1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); } 1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); } 1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); } 2019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); } 2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, iterator> equal_range(const _KT& __x) 2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.equal_range_unique(__x); } 2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<const_iterator, const_iterator> equal_range(const _KT& __x) const 2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.equal_range_unique(__x); } 2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block//Specific iterator traits creation 2129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_CREATE_ITERATOR_TRAITS(MultisetTraitsT, Const_traits) 2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>), 215e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) > 2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass multiset 2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 2189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : public __stlport_class<multiset<_Key, _Compare, _Alloc> > 2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ 2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef multiset<_Key, _Compare, _Alloc> _Self; 2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // typedefs: 2249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Key key_type; 2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Key value_type; 2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Compare key_compare; 2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Compare value_compare; 2299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Specific iterator traits creation 2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _MultisetTraitsT<value_type> _MultisetTraits; 2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Following typedef have to be public for __move_traits specialization. 2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _Rb_tree<key_type, key_compare, 2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block value_type, _STLP_PRIV _Identity<value_type>, 2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _MultisetTraits, _Alloc> _Rep_type; 2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::pointer pointer; 2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_pointer const_pointer; 2429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::reference reference; 2439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_reference const_reference; 2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::iterator iterator; 2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_iterator const_iterator; 2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::reverse_iterator reverse_iterator; 2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::size_type size_type; 2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::difference_type difference_type; 2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Rep_type::allocator_type allocator_type; 2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Rep_type _M_t; // red-black tree representing multiset 2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 2559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) 2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit multiset(const _Compare& __comp = _Compare(), 2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset() 2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) {} 2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit multiset(const _Compare& __comp) 2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, allocator_type()) {} 2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const _Compare& __comp, const allocator_type& __a) 2669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) {} 2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 2709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(_InputIterator __first, _InputIterator __last) 2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(_InputIterator __first, _InputIterator __last, 2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _Compare& __comp, 2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); } 2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 2819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(_InputIterator __first, _InputIterator __last, 2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _Compare& __comp) 2849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, allocator_type()) { _M_t.insert_equal(__first, __last); } 2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const value_type* __first, const value_type* __last) 2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 2899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const value_type* __first, const value_type* __last, 2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _Compare& __comp, 2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); } 2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const_iterator __first, const_iterator __last) 2979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(_Compare(), allocator_type()) 2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const_iterator __first, const_iterator __last, 3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _Compare& __comp, 3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); } 3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */ 3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(const _Self& __x) : _M_t(__x._M_t) {} 3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Self& operator=(const _Self& __x) { 3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _M_t = __x._M_t; 3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return *this; 3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block } 3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 312e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC) 3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block multiset(__move_source<_Self> src) 3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {} 315e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 3169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // accessors: 3189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block key_compare key_comp() const { return _M_t.key_comp(); } 3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block value_compare value_comp() const { return _M_t.key_comp(); } 3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block allocator_type get_allocator() const { return _M_t.get_allocator(); } 3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator begin() { return _M_t.begin(); } 3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator end() { return _M_t.end(); } 3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator begin() const { return _M_t.begin(); } 3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator end() const { return _M_t.end(); } 3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block reverse_iterator rbegin() { return _M_t.rbegin(); } 3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block reverse_iterator rend() { return _M_t.rend(); } 3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_reverse_iterator rbegin() const { return _M_t.rbegin(); } 3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_reverse_iterator rend() const { return _M_t.rend(); } 3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block bool empty() const { return _M_t.empty(); } 3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type size() const { return _M_t.size(); } 3329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_size() const { return _M_t.max_size(); } 3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void swap(_Self& __x) { _M_t.swap(__x._M_t); } 334e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 335e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott void _M_swap_workaround(_Self& __x) { swap(__x); } 336e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // insert/erase 3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator insert(const value_type& __x) 3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.insert_equal(__x); } 3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator insert(iterator __pos, const value_type& __x) 3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_t.insert_equal(__pos, __x); } 3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 3459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 3469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(_InputIterator __first, _InputIterator __last) 3479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 3489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 3499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const value_type* __first, const value_type* __last) 3509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 3519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const_iterator __first, const_iterator __last) 3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_t.insert_equal(__first, __last); } 3539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_MEMBER_TEMPLATES */ 3549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __pos) { _M_t.erase( __pos ); } 3559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type erase(const key_type& __x) { return _M_t.erase(__x); } 3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __first, iterator __last) { _M_t.erase( __first, __last ); } 3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void clear() { _M_t.clear(); } 3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // multiset operations: 3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator find(const _KT& __x) { return _M_t.find(__x); } 3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator find(const _KT& __x) const { return _M_t.find(__x); } 3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type count(const _KT& __x) const { return _M_t.count(__x); } 3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); } 3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); } 3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); } 3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); } 3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, iterator> equal_range(const _KT& __x) { return _M_t.equal_range(__x); } 3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<const_iterator, const_iterator> equal_range(const _KT& __x) const { return _M_t.equal_range(__x); } 3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 3819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# include <stl/pointers/_set.h> 3829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_BEGIN_NAMESPACE 3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_PTR_SPECIALIZATIONS */ 3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_HEADER template <class _Key, class _Compare, class _Alloc> 3869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_CONTAINER set<_Key,_Compare,_Alloc> 3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/_relops_cont.h> 3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_CONTAINER 3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_CONTAINER multiset<_Key,_Compare,_Alloc> 3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/_relops_cont.h> 3919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_CONTAINER 3929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_HEADER 3939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 394e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC) 3959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Key, class _Compare, class _Alloc> 3969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockstruct __move_traits<set<_Key,_Compare,_Alloc> > : 3979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __move_traits_aux<typename set<_Key,_Compare,_Alloc>::_Rep_type> 3989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{}; 3999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Key, class _Compare, class _Alloc> 4019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockstruct __move_traits<multiset<_Key,_Compare,_Alloc> > : 4029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __move_traits_aux<typename multiset<_Key,_Compare,_Alloc>::_Rep_type> 4039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{}; 404e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 4059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_END_NAMESPACE 4079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_INTERNAL_SET_H */ 4099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Local Variables: 4119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// mode:C++ 4129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// End: 413