summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/tr1/unordered_map
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-19 09:07:56 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-19 09:07:56 +0000
commitae4a7d92ed31eeacb6c8728e33b7af0fde87268c (patch)
tree76de244c6642362c0e7e7e91a9a77d1a5323fec4 /libstdc++-v3/include/tr1/unordered_map
parent467bcbd954d12c80d5a69ef36d7be7eba758ab8a (diff)
downloadppe42-gcc-ae4a7d92ed31eeacb6c8728e33b7af0fde87268c.tar.gz
ppe42-gcc-ae4a7d92ed31eeacb6c8728e33b7af0fde87268c.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/tr1/unordered_map')
-rw-r--r--libstdc++-v3/include/tr1/unordered_map182
1 files changed, 93 insertions, 89 deletions
diff --git a/libstdc++-v3/include/tr1/unordered_map b/libstdc++-v3/include/tr1/unordered_map
index 58aaa08c093..9d0098b590b 100644
--- a/libstdc++-v3/include/tr1/unordered_map
+++ b/libstdc++-v3/include/tr1/unordered_map
@@ -43,120 +43,124 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// XXX When we get typedef templates these class definitions
// will be unnecessary.
- template<class Key, class T,
- class Hash = hash<Key>,
- class Pred = std::equal_to<Key>,
- class Alloc = std::allocator<std::pair<const Key, T> >,
- bool cache_hash_code = false>
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
+ bool __cache_hash_code = false>
class unordered_map
- : public hashtable<Key, std::pair<const Key, T>, Alloc,
- std::_Select1st<std::pair<const Key, T> >, Pred,
- Hash, detail::mod_range_hashing,
- detail::default_ranged_hash,
- detail::prime_rehash_policy,
- cache_hash_code, false, true>
+ : public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, true>
{
- typedef hashtable<Key, std::pair<const Key, T>, Alloc,
- std::_Select1st<std::pair<const Key, T> >, Pred,
- Hash, detail::mod_range_hashing,
- detail::default_ranged_hash,
- detail::prime_rehash_policy,
- cache_hash_code, false, true>
- Base;
+ typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, true>
+ _Base;
public:
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
- typedef typename Base::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
explicit
- unordered_map(size_type n = 10,
- const hasher& hf = hasher(),
- const key_equal& eql = key_equal(),
- const allocator_type& a = allocator_type())
- : Base(n, hf, detail::mod_range_hashing(),
- detail::default_ranged_hash(),
- eql, std::_Select1st<std::pair<const Key, T> >(), a)
+ unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
- template<typename InputIterator>
- unordered_map(InputIterator f, InputIterator l,
- size_type n = 10,
- const hasher& hf = hasher(),
- const key_equal& eql = key_equal(),
- const allocator_type& a = allocator_type())
- : Base (f, l, n, hf, detail::mod_range_hashing(),
- detail::default_ranged_hash(),
- eql, std::_Select1st<std::pair<const Key, T> >(), a)
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
};
- template<class Key, class T,
- class Hash = hash<Key>,
- class Pred = std::equal_to<Key>,
- class Alloc = std::allocator<std::pair<const Key, T> >,
- bool cache_hash_code = false>
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
+ bool __cache_hash_code = false>
class unordered_multimap
- : public hashtable <Key, std::pair<const Key, T>,
- Alloc,
- std::_Select1st<std::pair<const Key, T> >, Pred,
- Hash, detail::mod_range_hashing,
- detail::default_ranged_hash,
- detail::prime_rehash_policy,
- cache_hash_code, false, false>
+ : public _Hashtable<_Key, std::pair<const _Key, _Tp>,
+ _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, false>
{
- typedef hashtable <Key, std::pair<const Key, T>,
- Alloc,
- std::_Select1st<std::pair<const Key, T> >, Pred,
- Hash, detail::mod_range_hashing,
- detail::default_ranged_hash,
- detail::prime_rehash_policy,
- cache_hash_code, false, false>
- Base;
+ typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
+ _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, false>
+ _Base;
public:
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
- typedef typename Base::allocator_type allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
explicit
- unordered_multimap(size_type n = 10,
- const hasher& hf = hasher(),
- const key_equal& eql = key_equal(),
- const allocator_type& a = allocator_type())
- : Base (n, hf, detail::mod_range_hashing(),
- detail::default_ranged_hash(),
- eql, std::_Select1st<std::pair<const Key, T> >(), a)
+ unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
- template<typename InputIterator>
- unordered_multimap(InputIterator f, InputIterator l,
- typename Base::size_type n = 0,
- const hasher& hf = hasher(),
- const key_equal& eql = key_equal(),
- const allocator_type& a = allocator_type())
- : Base (f, l, n, hf, detail::mod_range_hashing(),
- detail::default_ranged_hash(),
- eql, std::_Select1st<std::pair<const Key, T> >(), a)
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __f, _InputIterator __l,
+ typename _Base::size_type __n = 0,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
};
- template<class Key, class T, class Hash, class Pred, class Alloc,
- bool cache_hash_code>
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
inline void
- swap(unordered_map<Key, T, Hash, Pred, Alloc, cache_hash_code>& x,
- unordered_map<Key, T, Hash, Pred, Alloc, cache_hash_code>& y)
- { x.swap(y); }
-
- template<class Key, class T, class Hash, class Pred, class Alloc,
- bool cache_hash_code>
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
inline void
- swap(unordered_multimap<Key, T, Hash, Pred, Alloc, cache_hash_code>& x,
- unordered_multimap<Key, T, Hash, Pred, Alloc, cache_hash_code>& y)
- { x.swap(y); }
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
_GLIBCXX_END_NAMESPACE
}
OpenPOWER on IntegriCloud