Commit 95addb1b by Paolo Carlini Committed by Paolo Carlini

bitset (hash): Minor tweaks.

2010-03-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/bitset (hash): Minor tweaks.
	* include/debug/vector (hash): Likewise.
	* include/profile/bitset (hash): Likewise.
	* include/profile/vector (hash): Likewise.

From-SVN: r157186
parent 055f6a47
2010-03-02 Paolo Carlini <paolo.carlini@oracle.com> 2010-03-02 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/bitset (hash): Minor tweaks.
* include/debug/vector (hash): Likewise.
* include/profile/bitset (hash): Likewise.
* include/profile/vector (hash): Likewise.
2010-03-02 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/functional_hash.h (_Fnv_hash_base<>::hash): Change * include/bits/functional_hash.h (_Fnv_hash_base<>::hash): Change
to template. to template.
* include/tr1/functional_hash.h (_Fnv_hash_base<>::hash): Likewise. * include/tr1/functional_hash.h (_Fnv_hash_base<>::hash): Likewise.
......
...@@ -384,11 +384,11 @@ namespace __debug ...@@ -384,11 +384,11 @@ namespace __debug
// DR 1182. // DR 1182.
/// std::hash specialization for bitset. /// std::hash specialization for bitset.
template<size_t _Nb> template<size_t _Nb>
struct hash<std::__debug::bitset<_Nb>> struct hash<__debug::bitset<_Nb>>
: public std::unary_function<std::__debug::bitset<_Nb>, size_t> : public std::unary_function<__debug::bitset<_Nb>, size_t>
{ {
size_t size_t
operator()(const std::__debug::bitset<_Nb>& __b) const operator()(const __debug::bitset<_Nb>& __b) const
{ return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); } { return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); }
}; };
#endif #endif
......
...@@ -542,10 +542,10 @@ namespace __debug ...@@ -542,10 +542,10 @@ namespace __debug
/// std::hash specialization for vector<bool>. /// std::hash specialization for vector<bool>.
template<typename _Alloc> template<typename _Alloc>
struct hash<__debug::vector<bool, _Alloc>> struct hash<__debug::vector<bool, _Alloc>>
: public std::unary_function<std::__debug::vector<bool, _Alloc>, size_t> : public std::unary_function<__debug::vector<bool, _Alloc>, size_t>
{ {
size_t size_t
operator()(const std::__debug::vector<bool, _Alloc>& __b) const operator()(const __debug::vector<bool, _Alloc>& __b) const
{ return std::hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>() { return std::hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>()
(__b._M_base()); } (__b._M_base()); }
}; };
......
...@@ -358,11 +358,11 @@ namespace __profile ...@@ -358,11 +358,11 @@ namespace __profile
// DR 1182. // DR 1182.
/// std::hash specialization for bitset. /// std::hash specialization for bitset.
template<size_t _Nb> template<size_t _Nb>
struct hash<std::__profile::bitset<_Nb>> struct hash<__profile::bitset<_Nb>>
: public std::unary_function<std::__profile::bitset<_Nb>, size_t> : public std::unary_function<__profile::bitset<_Nb>, size_t>
{ {
size_t size_t
operator()(const std::__profile::bitset<_Nb>& __b) const operator()(const __profile::bitset<_Nb>& __b) const
{ return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); } { return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); }
}; };
#endif #endif
......
...@@ -467,10 +467,10 @@ namespace __profile ...@@ -467,10 +467,10 @@ namespace __profile
/// std::hash specialization for vector<bool>. /// std::hash specialization for vector<bool>.
template<typename _Alloc> template<typename _Alloc>
struct hash<__profile::vector<bool, _Alloc>> struct hash<__profile::vector<bool, _Alloc>>
: public std::unary_function<std::__profile::vector<bool, _Alloc>, size_t> : public std::unary_function<__profile::vector<bool, _Alloc>, size_t>
{ {
size_t size_t
operator()(const std::__profile::vector<bool, _Alloc>& __b) const operator()(const __profile::vector<bool, _Alloc>& __b) const
{ return std::hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>() { return std::hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>()
(__b._M_base()); } (__b._M_base()); }
}; };
......
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