00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 namespace std
00031 {
00032 _GLIBCXX_BEGIN_NAMESPACE_TR1
00033
00034
00035
00036 template<class _Value,
00037 class _Hash = hash<_Value>,
00038 class _Pred = std::equal_to<_Value>,
00039 class _Alloc = std::allocator<_Value>,
00040 bool __cache_hash_code = false>
00041 class __unordered_set
00042 : public _Hashtable<_Value, _Value, _Alloc,
00043 std::_Identity<_Value>, _Pred,
00044 _Hash, __detail::_Mod_range_hashing,
00045 __detail::_Default_ranged_hash,
00046 __detail::_Prime_rehash_policy,
00047 __cache_hash_code, true, true>
00048 {
00049 typedef _Hashtable<_Value, _Value, _Alloc,
00050 std::_Identity<_Value>, _Pred,
00051 _Hash, __detail::_Mod_range_hashing,
00052 __detail::_Default_ranged_hash,
00053 __detail::_Prime_rehash_policy,
00054 __cache_hash_code, true, true>
00055 _Base;
00056
00057 public:
00058 typedef typename _Base::size_type size_type;
00059 typedef typename _Base::hasher hasher;
00060 typedef typename _Base::key_equal key_equal;
00061 typedef typename _Base::allocator_type allocator_type;
00062
00063 explicit
00064 __unordered_set(size_type __n = 10,
00065 const hasher& __hf = hasher(),
00066 const key_equal& __eql = key_equal(),
00067 const allocator_type& __a = allocator_type())
00068 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
00069 __detail::_Default_ranged_hash(), __eql,
00070 std::_Identity<_Value>(), __a)
00071 { }
00072
00073 template<typename _InputIterator>
00074 __unordered_set(_InputIterator __f, _InputIterator __l,
00075 size_type __n = 10,
00076 const hasher& __hf = hasher(),
00077 const key_equal& __eql = key_equal(),
00078 const allocator_type& __a = allocator_type())
00079 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
00080 __detail::_Default_ranged_hash(), __eql,
00081 std::_Identity<_Value>(), __a)
00082 { }
00083
00084 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
00085 __unordered_set(__unordered_set&& __x)
00086 : _Base(std::forward<_Base>(__x)) { }
00087 #endif
00088 };
00089
00090 template<class _Value,
00091 class _Hash = hash<_Value>,
00092 class _Pred = std::equal_to<_Value>,
00093 class _Alloc = std::allocator<_Value>,
00094 bool __cache_hash_code = false>
00095 class __unordered_multiset
00096 : public _Hashtable<_Value, _Value, _Alloc,
00097 std::_Identity<_Value>, _Pred,
00098 _Hash, __detail::_Mod_range_hashing,
00099 __detail::_Default_ranged_hash,
00100 __detail::_Prime_rehash_policy,
00101 __cache_hash_code, true, false>
00102 {
00103 typedef _Hashtable<_Value, _Value, _Alloc,
00104 std::_Identity<_Value>, _Pred,
00105 _Hash, __detail::_Mod_range_hashing,
00106 __detail::_Default_ranged_hash,
00107 __detail::_Prime_rehash_policy,
00108 __cache_hash_code, true, false>
00109 _Base;
00110
00111 public:
00112 typedef typename _Base::size_type size_type;
00113 typedef typename _Base::hasher hasher;
00114 typedef typename _Base::key_equal key_equal;
00115 typedef typename _Base::allocator_type allocator_type;
00116
00117 explicit
00118 __unordered_multiset(size_type __n = 10,
00119 const hasher& __hf = hasher(),
00120 const key_equal& __eql = key_equal(),
00121 const allocator_type& __a = allocator_type())
00122 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
00123 __detail::_Default_ranged_hash(), __eql,
00124 std::_Identity<_Value>(), __a)
00125 { }
00126
00127
00128 template<typename _InputIterator>
00129 __unordered_multiset(_InputIterator __f, _InputIterator __l,
00130 typename _Base::size_type __n = 0,
00131 const hasher& __hf = hasher(),
00132 const key_equal& __eql = key_equal(),
00133 const allocator_type& __a = allocator_type())
00134 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
00135 __detail::_Default_ranged_hash(), __eql,
00136 std::_Identity<_Value>(), __a)
00137 { }
00138
00139 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
00140 __unordered_multiset(__unordered_multiset&& __x)
00141 : _Base(std::forward<_Base>(__x)) { }
00142 #endif
00143 };
00144
00145 template<class _Value, class _Hash, class _Pred, class _Alloc,
00146 bool __cache_hash_code>
00147 inline void
00148 swap(__unordered_set<_Value, _Hash, _Pred, _Alloc, __cache_hash_code>& __x,
00149 __unordered_set<_Value, _Hash, _Pred, _Alloc, __cache_hash_code>& __y)
00150 { __x.swap(__y); }
00151
00152 template<class _Value, class _Hash, class _Pred, class _Alloc,
00153 bool __cache_hash_code>
00154 inline void
00155 swap(__unordered_multiset<_Value, _Hash, _Pred,
00156 _Alloc, __cache_hash_code>& __x,
00157 __unordered_multiset<_Value, _Hash, _Pred,
00158 _Alloc, __cache_hash_code>& __y)
00159 { __x.swap(__y); }
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177 template<class _Value,
00178 class _Hash = hash<_Value>,
00179 class _Pred = std::equal_to<_Value>,
00180 class _Alloc = std::allocator<_Value> >
00181 class unordered_set
00182 : public __unordered_set<_Value, _Hash, _Pred, _Alloc>
00183 {
00184 typedef __unordered_set<_Value, _Hash, _Pred, _Alloc> _Base;
00185
00186 public:
00187 typedef typename _Base::value_type value_type;
00188 typedef typename _Base::size_type size_type;
00189 typedef typename _Base::hasher hasher;
00190 typedef typename _Base::key_equal key_equal;
00191 typedef typename _Base::allocator_type allocator_type;
00192
00193 explicit
00194 unordered_set(size_type __n = 10,
00195 const hasher& __hf = hasher(),
00196 const key_equal& __eql = key_equal(),
00197 const allocator_type& __a = allocator_type())
00198 : _Base(__n, __hf, __eql, __a)
00199 { }
00200
00201 template<typename _InputIterator>
00202 unordered_set(_InputIterator __f, _InputIterator __l,
00203 size_type __n = 10,
00204 const hasher& __hf = hasher(),
00205 const key_equal& __eql = key_equal(),
00206 const allocator_type& __a = allocator_type())
00207 : _Base(__f, __l, __n, __hf, __eql, __a)
00208 { }
00209
00210 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
00211 unordered_set(unordered_set&& __x)
00212 : _Base(std::forward<_Base>(__x)) { }
00213
00214 unordered_set(initializer_list<value_type> __l,
00215 size_type __n = 10,
00216 const hasher& __hf = hasher(),
00217 const key_equal& __eql = key_equal(),
00218 const allocator_type& __a = allocator_type())
00219 : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
00220 { }
00221
00222 unordered_set&
00223 operator=(unordered_set&& __x)
00224 {
00225
00226
00227 this->clear();
00228 this->swap(__x);
00229 return *this;
00230 }
00231
00232 unordered_set&
00233 operator=(initializer_list<value_type> __l)
00234 {
00235 this->clear();
00236 this->insert(__l.begin(), __l.end());
00237 return *this;
00238 }
00239 #endif
00240 };
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257 template<class _Value,
00258 class _Hash = hash<_Value>,
00259 class _Pred = std::equal_to<_Value>,
00260 class _Alloc = std::allocator<_Value> >
00261 class unordered_multiset
00262 : public __unordered_multiset<_Value, _Hash, _Pred, _Alloc>
00263 {
00264 typedef __unordered_multiset<_Value, _Hash, _Pred, _Alloc> _Base;
00265
00266 public:
00267 typedef typename _Base::value_type value_type;
00268 typedef typename _Base::size_type size_type;
00269 typedef typename _Base::hasher hasher;
00270 typedef typename _Base::key_equal key_equal;
00271 typedef typename _Base::allocator_type allocator_type;
00272
00273 explicit
00274 unordered_multiset(size_type __n = 10,
00275 const hasher& __hf = hasher(),
00276 const key_equal& __eql = key_equal(),
00277 const allocator_type& __a = allocator_type())
00278 : _Base(__n, __hf, __eql, __a)
00279 { }
00280
00281
00282 template<typename _InputIterator>
00283 unordered_multiset(_InputIterator __f, _InputIterator __l,
00284 typename _Base::size_type __n = 0,
00285 const hasher& __hf = hasher(),
00286 const key_equal& __eql = key_equal(),
00287 const allocator_type& __a = allocator_type())
00288 : _Base(__f, __l, __n, __hf, __eql, __a)
00289 { }
00290
00291 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
00292 unordered_multiset(unordered_multiset&& __x)
00293 : _Base(std::forward<_Base>(__x)) { }
00294
00295 unordered_multiset(initializer_list<value_type> __l,
00296 size_type __n = 10,
00297 const hasher& __hf = hasher(),
00298 const key_equal& __eql = key_equal(),
00299 const allocator_type& __a = allocator_type())
00300 : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
00301 { }
00302
00303 unordered_multiset&
00304 operator=(unordered_multiset&& __x)
00305 {
00306
00307
00308 this->clear();
00309 this->swap(__x);
00310 return *this;
00311 }
00312
00313 unordered_multiset&
00314 operator=(initializer_list<value_type> __l)
00315 {
00316 this->clear();
00317 this->insert(__l.begin(), __l.end());
00318 return *this;
00319 }
00320 #endif
00321 };
00322
00323 template<class _Value, class _Hash, class _Pred, class _Alloc>
00324 inline void
00325 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
00326 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
00327 { __x.swap(__y); }
00328
00329 template<class _Value, class _Hash, class _Pred, class _Alloc>
00330 inline void
00331 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
00332 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
00333 { __x.swap(__y); }
00334
00335 _GLIBCXX_END_NAMESPACE_TR1
00336 }