Commit 95cefe5f by Paolo Carlini Committed by Paolo Carlini

hashtable_policy.h: Uglify all the names.

2006-09-19  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/hashtable_policy.h: Uglify all the names.
	* include/tr1/hashtable: Likewise.
	* include/tr1/unordered_map: Likewise.
	* include/tr1/unordered_set: Likewise.
	* include/tr1/functional: Uglify struct hash names.
	* include/tr1/cmath: Uglify namespace detail to __detail.

From-SVN: r117052
parent b5387733
2006-09-19 Paolo Carlini <pcarlini@suse.de>
* include/tr1/hashtable_policy.h: Uglify all the names.
* include/tr1/hashtable: Likewise.
* include/tr1/unordered_map: Likewise.
* include/tr1/unordered_set: Likewise.
* include/tr1/functional: Uglify struct hash names.
* include/tr1/cmath: Uglify namespace detail to __detail.
2006-09-18 Benjamin Kosnik <bkoz@redhat.com> 2006-09-18 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/util/regression/res_mng: Remove. * testsuite/util/regression/res_mng: Remove.
......
...@@ -368,21 +368,23 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -368,21 +368,23 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
using std::atan; using std::atan;
// Workaround for c++/21682. // Workaround for c++/21682.
namespace detail namespace __detail
{ {
template<typename _Tp, typename _Up> template<typename _Tp, typename _Up>
inline typename __gnu_cxx::__enable_if<std::__is_floating<_Tp>::__value inline typename
__gnu_cxx::__enable_if<std::__is_floating<_Tp>::__value
|| std::__is_floating<_Up>::__value, || std::__is_floating<_Up>::__value,
typename std::tr1::__promote_2<_Tp, _Up>::__type>::__type typename
std::tr1::__promote_2<_Tp, _Up>::__type>::__type
atan2(_Tp __y, _Up __x) atan2(_Tp __y, _Up __x)
{ {
typedef typename std::tr1::__promote_2<_Tp, _Up>::__type __type; typedef typename std::tr1::__promote_2<_Tp, _Up>::__type __type;
return std::atan2(__type(__y), __type(__x)); return std::atan2(__type(__y), __type(__x));
} }
} // namespace detail } // namespace __detail
using std::atan2; using std::atan2;
using detail::atan2; using __detail::atan2;
inline float inline float
atanh(float __x) atanh(float __x)
......
// TR1 functional header -*- C++ -*- // TR1 functional header -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -1100,37 +1100,37 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1100,37 +1100,37 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
template<typename T> template<typename T>
struct hash; struct hash;
#define tr1_hashtable_define_trivial_hash(T) \ #define _TR1_hashtable_define_trivial_hash(_Tp) \
template<> \ template<> \
struct hash<T> \ struct hash<_Tp> \
: public std::unary_function<T, std::size_t> \ : public std::unary_function<_Tp, std::size_t> \
{ \ { \
std::size_t \ std::size_t \
operator()(T val) const \ operator()(_Tp __val) const \
{ return static_cast<std::size_t>(val); } \ { return static_cast<std::size_t>(__val); } \
} }
tr1_hashtable_define_trivial_hash(bool); _TR1_hashtable_define_trivial_hash(bool);
tr1_hashtable_define_trivial_hash(char); _TR1_hashtable_define_trivial_hash(char);
tr1_hashtable_define_trivial_hash(signed char); _TR1_hashtable_define_trivial_hash(signed char);
tr1_hashtable_define_trivial_hash(unsigned char); _TR1_hashtable_define_trivial_hash(unsigned char);
tr1_hashtable_define_trivial_hash(wchar_t); _TR1_hashtable_define_trivial_hash(wchar_t);
tr1_hashtable_define_trivial_hash(short); _TR1_hashtable_define_trivial_hash(short);
tr1_hashtable_define_trivial_hash(int); _TR1_hashtable_define_trivial_hash(int);
tr1_hashtable_define_trivial_hash(long); _TR1_hashtable_define_trivial_hash(long);
tr1_hashtable_define_trivial_hash(unsigned short); _TR1_hashtable_define_trivial_hash(unsigned short);
tr1_hashtable_define_trivial_hash(unsigned int); _TR1_hashtable_define_trivial_hash(unsigned int);
tr1_hashtable_define_trivial_hash(unsigned long); _TR1_hashtable_define_trivial_hash(unsigned long);
#undef tr1_hashtable_define_trivial_hash #undef _TR1_hashtable_define_trivial_hash
template<typename T> template<typename _Tp>
struct hash<T*> struct hash<_Tp*>
: public std::unary_function<T*, std::size_t> : public std::unary_function<_Tp*, std::size_t>
{ {
std::size_t std::size_t
operator()(T* p) const operator()(_Tp* __p) const
{ return reinterpret_cast<std::size_t>(p); } { return reinterpret_cast<std::size_t>(__p); }
}; };
// Fowler / Noll / Vo (FNV) Hash (type FNV-1a) // Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
...@@ -1138,47 +1138,48 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1138,47 +1138,48 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// Dummy generic implementation (for sizeof(size_t) != 4, 8). // Dummy generic implementation (for sizeof(size_t) != 4, 8).
template<std::size_t = sizeof(std::size_t)> template<std::size_t = sizeof(std::size_t)>
struct Fnv_hash struct _Fnv_hash
{ {
static std::size_t static std::size_t
hash(const char* first, std::size_t length) hash(const char* __first, std::size_t __length)
{ {
std::size_t result = 0; std::size_t __result = 0;
for (; length > 0; --length) for (; __length > 0; --__length)
result = (result * 131) + *first++; __result = (__result * 131) + *__first++;
return result; return __result;
} }
}; };
template<> template<>
struct Fnv_hash<4> struct _Fnv_hash<4>
{ {
static std::size_t static std::size_t
hash(const char* first, std::size_t length) hash(const char* __first, std::size_t __length)
{ {
std::size_t result = static_cast<std::size_t>(2166136261UL); std::size_t __result = static_cast<std::size_t>(2166136261UL);
for (; length > 0; --length) for (; __length > 0; --__length)
{ {
result ^= (std::size_t)*first++; __result ^= (std::size_t)*__first++;
result *= 16777619UL; __result *= 16777619UL;
} }
return result; return __result;
} }
}; };
template<> template<>
struct Fnv_hash<8> struct _Fnv_hash<8>
{ {
static std::size_t static std::size_t
hash(const char* first, std::size_t length) hash(const char* __first, std::size_t __length)
{ {
std::size_t result = static_cast<std::size_t>(14695981039346656037ULL); std::size_t __result =
for (; length > 0; --length) static_cast<std::size_t>(14695981039346656037ULL);
for (; __length > 0; --__length)
{ {
result ^= (std::size_t)*first++; __result ^= (std::size_t)*__first++;
result *= 1099511628211ULL; __result *= 1099511628211ULL;
} }
return result; return __result;
} }
}; };
...@@ -1190,8 +1191,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1190,8 +1191,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
: public std::unary_function<std::string, std::size_t> : public std::unary_function<std::string, std::size_t>
{ {
std::size_t std::size_t
operator()(const std::string& s) const operator()(const std::string& __s) const
{ return Fnv_hash<>::hash(s.data(), s.length()); } { return _Fnv_hash<>::hash(__s.data(), __s.length()); }
}; };
#ifdef _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_WCHAR_T
...@@ -1200,10 +1201,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1200,10 +1201,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
: public std::unary_function<std::wstring, std::size_t> : public std::unary_function<std::wstring, std::size_t>
{ {
std::size_t std::size_t
operator()(const std::wstring& s) const operator()(const std::wstring& __s) const
{ {
return Fnv_hash<>::hash(reinterpret_cast<const char*>(s.data()), return _Fnv_hash<>::hash(reinterpret_cast<const char*>(__s.data()),
s.length() * sizeof(wchar_t)); __s.length() * sizeof(wchar_t));
} }
}; };
#endif #endif
...@@ -1213,15 +1214,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1213,15 +1214,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
: public std::unary_function<float, std::size_t> : public std::unary_function<float, std::size_t>
{ {
std::size_t std::size_t
operator()(float fval) const operator()(float __fval) const
{ {
std::size_t result = 0; std::size_t __result = 0;
// 0 and -0 both hash to zero. // 0 and -0 both hash to zero.
if (fval != 0.0f) if (__fval != 0.0f)
result = Fnv_hash<>::hash(reinterpret_cast<const char*>(&fval), __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__fval),
sizeof(fval)); sizeof(__fval));
return result; return __result;
} }
}; };
...@@ -1230,15 +1231,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1230,15 +1231,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
: public std::unary_function<double, std::size_t> : public std::unary_function<double, std::size_t>
{ {
std::size_t std::size_t
operator()(double dval) const operator()(double __dval) const
{ {
std::size_t result = 0; std::size_t __result = 0;
// 0 and -0 both hash to zero. // 0 and -0 both hash to zero.
if (dval != 0.0) if (__dval != 0.0)
result = Fnv_hash<>::hash(reinterpret_cast<const char*>(&dval), __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__dval),
sizeof(dval)); sizeof(__dval));
return result; return __result;
} }
}; };
...@@ -1249,29 +1250,30 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1249,29 +1250,30 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
: public std::unary_function<long double, std::size_t> : public std::unary_function<long double, std::size_t>
{ {
std::size_t std::size_t
operator()(long double ldval) const operator()(long double __ldval) const
{ {
std::size_t result = 0; std::size_t __result = 0;
int exponent; int __exponent;
ldval = std::frexp(ldval, &exponent); __ldval = std::frexp(__ldval, &__exponent);
ldval = ldval < 0.0l ? -(ldval + 0.5l) : ldval; __ldval = __ldval < 0.0l ? -(__ldval + 0.5l) : __ldval;
const long double mult = std::numeric_limits<std::size_t>::max() + 1.0l; const long double __mult =
ldval *= mult; std::numeric_limits<std::size_t>::max() + 1.0l;
__ldval *= __mult;
// Try to use all the bits of the mantissa (really necessary only // Try to use all the bits of the mantissa (really necessary only
// on 32-bit targets, at least for 80-bit floating point formats). // on 32-bit targets, at least for 80-bit floating point formats).
const std::size_t hibits = (std::size_t)ldval; const std::size_t __hibits = (std::size_t)__ldval;
ldval = (ldval - (long double)hibits) * mult; __ldval = (__ldval - (long double)__hibits) * __mult;
const std::size_t coeff = const std::size_t __coeff =
(std::numeric_limits<std::size_t>::max() (std::numeric_limits<std::size_t>::max()
/ std::numeric_limits<long double>::max_exponent); / std::numeric_limits<long double>::max_exponent);
result = hibits + (std::size_t)ldval + coeff * exponent; __result = __hibits + (std::size_t)__ldval + __coeff * __exponent;
return result; return __result;
} }
}; };
......
...@@ -43,120 +43,124 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -43,120 +43,124 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// XXX When we get typedef templates these class definitions // XXX When we get typedef templates these class definitions
// will be unnecessary. // will be unnecessary.
template<class Key, class T, template<class _Key, class _Tp,
class Hash = hash<Key>, class _Hash = hash<_Key>,
class Pred = std::equal_to<Key>, class _Pred = std::equal_to<_Key>,
class Alloc = std::allocator<std::pair<const Key, T> >, class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
bool cache_hash_code = false> bool __cache_hash_code = false>
class unordered_map class unordered_map
: public hashtable<Key, std::pair<const Key, T>, Alloc, : public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
std::_Select1st<std::pair<const Key, T> >, Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, false, true> __cache_hash_code, false, true>
{ {
typedef hashtable<Key, std::pair<const Key, T>, Alloc, typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
std::_Select1st<std::pair<const Key, T> >, Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, false, true> __cache_hash_code, false, true>
Base; _Base;
public: public:
typedef typename Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
typedef typename Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_map(size_type n = 10, unordered_map(size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base(n, hf, detail::mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), __detail::_Default_ranged_hash(),
eql, std::_Select1st<std::pair<const Key, T> >(), a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
template<typename InputIterator> template<typename _InputIterator>
unordered_map(InputIterator f, InputIterator l, unordered_map(_InputIterator __f, _InputIterator __l,
size_type n = 10, size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base (f, l, n, hf, detail::mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), __detail::_Default_ranged_hash(),
eql, std::_Select1st<std::pair<const Key, T> >(), a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
}; };
template<class Key, class T, template<class _Key, class _Tp,
class Hash = hash<Key>, class _Hash = hash<_Key>,
class Pred = std::equal_to<Key>, class _Pred = std::equal_to<_Key>,
class Alloc = std::allocator<std::pair<const Key, T> >, class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
bool cache_hash_code = false> bool __cache_hash_code = false>
class unordered_multimap class unordered_multimap
: public hashtable <Key, std::pair<const Key, T>, : public _Hashtable<_Key, std::pair<const _Key, _Tp>,
Alloc, _Alloc,
std::_Select1st<std::pair<const Key, T> >, Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, false, false> __cache_hash_code, false, false>
{ {
typedef hashtable <Key, std::pair<const Key, T>, typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
Alloc, _Alloc,
std::_Select1st<std::pair<const Key, T> >, Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, false, false> __cache_hash_code, false, false>
Base; _Base;
public: public:
typedef typename Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
typedef typename Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_multimap(size_type n = 10, unordered_multimap(size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base (n, hf, detail::mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), __detail::_Default_ranged_hash(),
eql, std::_Select1st<std::pair<const Key, T> >(), a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
template<typename InputIterator> template<typename _InputIterator>
unordered_multimap(InputIterator f, InputIterator l, unordered_multimap(_InputIterator __f, _InputIterator __l,
typename Base::size_type n = 0, typename _Base::size_type __n = 0,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base (f, l, n, hf, detail::mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), __detail::_Default_ranged_hash(),
eql, std::_Select1st<std::pair<const Key, T> >(), a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
}; };
template<class Key, class T, class Hash, class Pred, class Alloc, template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
bool cache_hash_code> bool __cache_hash_code>
inline void inline void
swap(unordered_map<Key, T, Hash, Pred, Alloc, cache_hash_code>& x, swap(unordered_map<_Key, _Tp, _Hash, _Pred,
unordered_map<Key, T, Hash, Pred, Alloc, cache_hash_code>& y) _Alloc, __cache_hash_code>& __x,
{ x.swap(y); } unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y)
template<class Key, class T, class Hash, class Pred, class Alloc, { __x.swap(__y); }
bool cache_hash_code>
template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code>
inline void inline void
swap(unordered_multimap<Key, T, Hash, Pred, Alloc, cache_hash_code>& x, swap(unordered_multimap<_Key, _Tp, _Hash, _Pred,
unordered_multimap<Key, T, Hash, Pred, Alloc, cache_hash_code>& y) _Alloc, __cache_hash_code>& __x,
{ x.swap(y); } unordered_multimap<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); }
_GLIBCXX_END_NAMESPACE _GLIBCXX_END_NAMESPACE
} }
......
...@@ -43,114 +43,122 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -43,114 +43,122 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// XXX When we get typedef templates these class definitions // XXX When we get typedef templates these class definitions
// will be unnecessary. // will be unnecessary.
template<class Value, template<class _Value,
class Hash = hash<Value>, class _Hash = hash<_Value>,
class Pred = std::equal_to<Value>, class _Pred = std::equal_to<_Value>,
class Alloc = std::allocator<Value>, class _Alloc = std::allocator<_Value>,
bool cache_hash_code = false> bool __cache_hash_code = false>
class unordered_set class unordered_set
: public hashtable<Value, Value, Alloc, : public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<Value>, Pred, std::_Identity<_Value>, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, true, true> __cache_hash_code, true, true>
{ {
typedef hashtable<Value, Value, Alloc, typedef _Hashtable<_Value, _Value, _Alloc,
std::_Identity<Value>, Pred, std::_Identity<_Value>, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, true, true> __cache_hash_code, true, true>
Base; _Base;
public: public:
typedef typename Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
typedef typename Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_set(size_type n = 10, unordered_set(size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base(n, hf, detail::mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), eql, std::_Identity<Value>(), a) __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ } { }
template<typename InputIterator> template<typename _InputIterator>
unordered_set(InputIterator f, InputIterator l, unordered_set(_InputIterator __f, _InputIterator __l,
size_type n = 10, size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base(f, l, n, hf, detail::mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), eql, std::_Identity<Value>(), a) __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ } { }
}; };
template<class Value, template<class _Value,
class Hash = hash<Value>, class _Hash = hash<_Value>,
class Pred = std::equal_to<Value>, class _Pred = std::equal_to<_Value>,
class Alloc = std::allocator<Value>, class _Alloc = std::allocator<_Value>,
bool cache_hash_code = false> bool __cache_hash_code = false>
class unordered_multiset class unordered_multiset
: public hashtable <Value, Value, Alloc, : public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<Value>, Pred, std::_Identity<_Value>, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, true, false> __cache_hash_code, true, false>
{ {
typedef hashtable<Value, Value, Alloc, typedef _Hashtable<_Value, _Value, _Alloc,
std::_Identity<Value>, Pred, std::_Identity<_Value>, _Pred,
Hash, detail::mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
detail::default_ranged_hash, __detail::_Default_ranged_hash,
detail::prime_rehash_policy, __detail::_Prime_rehash_policy,
cache_hash_code, true, false> __cache_hash_code, true, false>
Base; _Base;
public: public:
typedef typename Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
typedef typename Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_multiset(size_type n = 10, unordered_multiset(size_type __n = 10,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base(n, hf, detail::mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), eql, std::_Identity<Value>(), a) __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ } { }
template<typename InputIterator> template<typename _InputIterator>
unordered_multiset(InputIterator f, InputIterator l, unordered_multiset(_InputIterator __f, _InputIterator __l,
typename Base::size_type n = 0, typename _Base::size_type __n = 0,
const hasher& hf = hasher(), const hasher& __hf = hasher(),
const key_equal& eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& a = allocator_type()) const allocator_type& __a = allocator_type())
: Base(f, l, n, hf, detail::mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
detail::default_ranged_hash(), eql, std::_Identity<Value>(), a) __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ } { }
}; };
template<class Value, class Hash, class Pred, class Alloc, template<class _Value, class _Hash, class _Pred, class _Alloc,
bool cache_hash_code> bool __cache_hash_code>
inline void inline void
swap (unordered_set<Value, Hash, Pred, Alloc, cache_hash_code>& x, swap (unordered_set<_Value, _Hash, _Pred,
unordered_set<Value, Hash, Pred, Alloc, cache_hash_code>& y) _Alloc, __cache_hash_code>& __x,
{ x.swap(y); } unordered_set<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y)
template<class Value, class Hash, class Pred, class Alloc, { __x.swap(__y); }
bool cache_hash_code>
template<class _Value, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code>
inline void inline void
swap(unordered_multiset<Value, Hash, Pred, Alloc, cache_hash_code>& x, swap(unordered_multiset<_Value, _Hash, _Pred,
unordered_multiset<Value, Hash, Pred, Alloc, cache_hash_code>& y) _Alloc, __cache_hash_code>& __x,
{ x.swap(y); } unordered_multiset<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); }
_GLIBCXX_END_NAMESPACE _GLIBCXX_END_NAMESPACE
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment