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_HASH_SET_H 319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_INTERNAL_HASH_SET_H 329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_INTERNAL_HASHTABLE_H 349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# include <stl/_hashtable.h> 359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_BEGIN_NAMESPACE 389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block//Specific iterator traits creation 409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_CREATE_HASH_ITERATOR_TRAITS(HashSetTraitsT, Const_traits) 419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>), 43e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>), 44e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) > 459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass hash_set 469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : public __stlport_class<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > 489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ 509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self; 519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Specific iterator traits creation 529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _HashSetTraitsT<_Value> _HashSetTraits; 539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hashtable<_Value, _Value, _HashFcn, 559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _HashSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; 569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::key_type key_type; 589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::value_type value_type; 599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::hasher hasher; 609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::key_equal key_equal; 619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::size_type size_type; 639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::difference_type difference_type; 649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::pointer pointer; 659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_pointer const_pointer; 669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::reference reference; 679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_reference const_reference; 689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::iterator iterator; 709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_iterator const_iterator; 719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::allocator_type allocator_type; 739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hasher hash_funct() const { return _M_ht.hash_funct(); } 759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block key_equal key_eq() const { return _M_ht.key_eq(); } 769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block allocator_type get_allocator() const { return _M_ht.get_allocator(); } 779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Ht _M_ht; 809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set() 84e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) {} 859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit hash_set(size_type __n) 869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} 879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(size_type __n, const hasher& __hf) 889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) {} 899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_SUP_DFLT_PARAM) 909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(size_type __n, const hasher& __hf, const key_equal& __eql, 919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(size_type __n, const hasher& __hf, const key_equal& __eql) 949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, allocator_type()) {} 959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(size_type __n, const hasher& __hf, const key_equal& __eql, 969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a) 979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) {} 999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 100e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC) 1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(__move_source<_Self> src) 1029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} 103e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(_InputIterator __f, _InputIterator __l) 108e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(_InputIterator __f, _InputIterator __l, size_type __n) 1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql) 1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, allocator_type()) 1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const value_type* __f, const value_type* __l) 134e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const value_type* __f, const value_type* __l, size_type __n) 1379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 1389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const value_type* __f, const value_type* __l, size_type __n, 1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 1419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const value_type* __f, const value_type* __l, size_type __n, 1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const_iterator __f, const_iterator __l) 150e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 1519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const_iterator __f, const_iterator __l, size_type __n) 1539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 1549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const_iterator __f, const_iterator __l, size_type __n, 1569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 1579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_set(const_iterator __f, const_iterator __l, size_type __n, 1609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 1639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f, __l); } 1649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_MEMBER_TEMPLATES */ 1659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type size() const { return _M_ht.size(); } 1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_size() const { return _M_ht.max_size(); } 1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block bool empty() const { return _M_ht.empty(); } 1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } 171e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 172e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott void _M_swap_workaround(_Self& __x) { swap(__x); } 173e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator begin() { return _M_ht.begin(); } 1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator end() { return _M_ht.end(); } 1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator begin() const { return _M_ht.begin(); } 1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator end() const { return _M_ht.end(); } 1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, bool> insert(const value_type& __obj) 1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.insert_unique(__obj); } 1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(_InputIterator __f, _InputIterator __l) 1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const_iterator __f, const_iterator __l) 1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block {_M_ht.insert_unique(__f, __l); } 1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const value_type* __f, const value_type* __l) 1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_unique(__f,__l); } 1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, bool> insert_noresize(const value_type& __obj) 1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.insert_unique_noresize(__obj); } 1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator find(const _KT& __key) { return _M_ht.find(__key); } 1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } 2009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type count(const _KT& __key) const { return _M_ht.count(__key); } 2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, iterator> equal_range(const _KT& __key) 2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.equal_range(__key); } 2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<const_iterator, const_iterator> equal_range(const _KT& __key) const 2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.equal_range(__key); } 2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 2129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type erase(const _KT& __key) {return _M_ht.erase(__key); } 2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __it) { _M_ht.erase(__it); } 2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } 2159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void clear() { _M_ht.clear(); } 2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void resize(size_type __hint) { _M_ht.resize(__hint); } 2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type bucket_count() const { return _M_ht.bucket_count(); } 2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } 2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type elems_in_bucket(size_type __n) const 2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.elems_in_bucket(__n); } 2239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 2249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block//Specific iterator traits creation 2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_CREATE_HASH_ITERATOR_TRAITS(HashMultisetTraitsT, Const_traits) 2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>), 229e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>), 230e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) > 2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass hash_multiset 2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : public __stlport_class<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > 2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif 2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ 2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self; 2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block //Specific iterator traits creation 2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV _HashMultisetTraitsT<_Value> _HashMultisetTraits; 2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hashtable<_Value, _Value, _HashFcn, 2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _HashMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; 2429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::key_type key_type; 2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::value_type value_type; 2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::hasher hasher; 2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::key_equal key_equal; 2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::size_type size_type; 2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::difference_type difference_type; 2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::pointer pointer; 2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_pointer const_pointer; 2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::reference reference; 2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_reference const_reference; 2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::iterator iterator; 2569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::const_iterator const_iterator; 2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Ht::allocator_type allocator_type; 2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hasher hash_funct() const { return _M_ht.hash_funct(); } 2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block key_equal key_eq() const { return _M_ht.key_eq(); } 2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block allocator_type get_allocator() const { return _M_ht.get_allocator(); } 2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprivate: 2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Ht _M_ht; 2669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset() 270e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) {} 2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block explicit hash_multiset(size_type __n) 2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} 2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(size_type __n, const hasher& __hf) 2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) {} 2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql) 2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, allocator_type()) {} 2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql, 2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a) 2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) {} 2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 281e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_MOVE_SEMANTIC) 2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(__move_source<_Self> src) 2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} 284e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(_InputIterator __f, _InputIterator __l) 289e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n) 2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 2979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql) 3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, allocator_type()) 3129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 3159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const value_type* __f, const value_type* __l) 316e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 3179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const value_type* __f, const value_type* __l, size_type __n) 3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const value_type* __f, const value_type* __l, size_type __n, 3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const value_type* __f, const value_type* __l, size_type __n, 3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const_iterator __f, const_iterator __l) 332e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott : _M_ht(0, hasher(), key_equal(), allocator_type()) 3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const_iterator __f, const_iterator __l, size_type __n) 3359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, hasher(), key_equal(), allocator_type()) 3369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const_iterator __f, const_iterator __l, size_type __n, 3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf) 3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, key_equal(), allocator_type()) 3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block hash_multiset(const_iterator __f, const_iterator __l, size_type __n, 3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const hasher& __hf, const key_equal& __eql, 3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const allocator_type& __a = allocator_type()) 3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : _M_ht(__n, __hf, __eql, __a) 3459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_MEMBER_TEMPLATES */ 3479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 3499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type size() const { return _M_ht.size(); } 3509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_size() const { return _M_ht.max_size(); } 3519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block bool empty() const { return _M_ht.empty(); } 3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void swap(_Self& hs) { _M_ht.swap(hs._M_ht); } 353e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 354e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott void _M_swap_workaround(_Self& __x) { swap(__x); } 355e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif 3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator begin() { return _M_ht.begin(); } 3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator end() { return _M_ht.end(); } 3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator begin() const { return _M_ht.begin(); } 3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator end() const { return _M_ht.end(); } 3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator insert(const value_type& __obj) { return _M_ht.insert_equal(__obj); } 3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) 3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block template <class _InputIterator> 3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(_InputIterator __f, _InputIterator __l) 3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f,__l); } 3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else 3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const value_type* __f, const value_type* __l) 3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f,__l); } 3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void insert(const_iterator __f, const_iterator __l) 3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { _M_ht.insert_equal(__f, __l); } 3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /*_STLP_MEMBER_TEMPLATES */ 3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator insert_noresize(const value_type& __obj) 3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.insert_equal_noresize(__obj); } 3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block iterator find(const _KT& __key) { return _M_ht.find(__key); } 3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } 3829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type count(const _KT& __key) const { return _M_ht.count(__key); } 3859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<iterator, iterator> equal_range(const _KT& __key) 3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.equal_range(__key); } 3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block pair<const_iterator, const_iterator> equal_range(const _KT& __key) const 3919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.equal_range(__key); } 3929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_TEMPLATE_FOR_CONT_EXT 3949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type erase(const _KT& __key) {return _M_ht.erase(__key); } 3959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __it) { _M_ht.erase(__it); } 3969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } 3979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void clear() { _M_ht.clear(); } 3989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 4009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block void resize(size_type __hint) { _M_ht.resize(__hint); } 4019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type bucket_count() const { return _M_ht.bucket_count(); } 4029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } 4039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_type elems_in_bucket(size_type __n) const 4049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block { return _M_ht.elems_in_bucket(__n); } 4059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 4069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 4089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_CONTAINER hash_set<_Value,_HashFcn,_EqualKey,_Alloc> 4099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/_relops_hash_cont.h> 4119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_CONTAINER 4139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_TEMPLATE_CONTAINER hash_multiset<_Value,_HashFcn,_EqualKey,_Alloc> 4149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/_relops_hash_cont.h> 4159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_CONTAINER 4179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_TEMPLATE_HEADER 4189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Specialization of insert_iterator so that it will work for hash_set 4209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// and hash_multiset. 4219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 423e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott# if !defined (_STLP_NO_MOVE_SEMANTIC) 4249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 4259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockstruct __move_traits<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > : 4269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __move_traits_aux<typename hash_set<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht> 4279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{}; 4289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 4309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockstruct __move_traits<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > : 4319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __move_traits_aux<typename hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht> 4329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{}; 433e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott# endif 4349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 4369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass insert_iterator<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > { 4379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprotected: 4389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container; 4399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Container* container; 4409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 4419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Container container_type; 4429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef output_iterator_tag iterator_category; 4439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void value_type; 4449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void difference_type; 4459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void pointer; 4469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void reference; 4479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator(_Container& __x) : container(&__x) {} 4499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator(_Container& __x, typename _Container::iterator) 4509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : container(&__x) {} 4519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& 4529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block operator=(const typename _Container::value_type& __val) { 4539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block container->insert(__val); 4549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return *this; 4559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block } 4569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator*() { return *this; } 4579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator++() { return *this; } 4589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator++(int) { return *this; } 4599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 4609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 4629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockclass insert_iterator<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > { 4639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockprotected: 4649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container; 4659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Container* container; 4669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typename _Container::iterator iter; 4679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockpublic: 4689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _Container container_type; 4699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef output_iterator_tag iterator_category; 4709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void value_type; 4719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void difference_type; 4729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void pointer; 4739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef void reference; 4749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator(_Container& __x) : container(&__x) {} 4769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator(_Container& __x, typename _Container::iterator) 4779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block : container(&__x) {} 4789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& 4799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block operator=(const typename _Container::value_type& __val) { 4809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block container->insert(__val); 4819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return *this; 4829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block } 4839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator*() { return *this; } 4849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator++() { return *this; } 4859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block insert_iterator<_Container>& operator++(int) { return *this; } 4869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block}; 4879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 4889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_END_NAMESPACE 4909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_INTERNAL_HASH_SET_H */ 4929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Local Variables: 4949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// mode:C++ 4959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// End: 496