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
This commit is contained in:
Paolo Carlini 2010-03-03 02:01:56 +00:00 committed by Paolo Carlini
parent 055f6a476c
commit 95addb1b84
5 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -384,11 +384,11 @@ namespace __debug
// DR 1182.
/// std::hash specialization for bitset.
template<size_t _Nb>
struct hash<std::__debug::bitset<_Nb>>
: public std::unary_function<std::__debug::bitset<_Nb>, size_t>
struct hash<__debug::bitset<_Nb>>
: public std::unary_function<__debug::bitset<_Nb>, 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()); }
};
#endif

View File

@ -542,10 +542,10 @@ namespace __debug
/// std::hash specialization for vector<bool>.
template<typename _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
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>>()
(__b._M_base()); }
};

View File

@ -358,11 +358,11 @@ namespace __profile
// DR 1182.
/// std::hash specialization for bitset.
template<size_t _Nb>
struct hash<std::__profile::bitset<_Nb>>
: public std::unary_function<std::__profile::bitset<_Nb>, size_t>
struct hash<__profile::bitset<_Nb>>
: public std::unary_function<__profile::bitset<_Nb>, 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()); }
};
#endif

View File

@ -467,10 +467,10 @@ namespace __profile
/// std::hash specialization for vector<bool>.
template<typename _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
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>>()
(__b._M_base()); }
};