Commit 9992d564 by Paolo Carlini Committed by Paolo Carlini

re PR libstdc++/48430 (std::hash partial specialization for std::unique_ptr and…

re PR libstdc++/48430 (std::hash partial specialization for std::unique_ptr and std::shared_ptr are using unary_function)

2011-07-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48430
	* include/bits/shared_ptr.h (struct hash<shared_ptr<>>): Use
	__hash_base.
	* include/bits/unique_ptr.h (struct hash<unique_ptr<>>): Likewise.

From-SVN: r176405
parent 15e2b595
2011-07-18 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48430
* include/bits/shared_ptr.h (struct hash<shared_ptr<>>): Use
__hash_base.
* include/bits/unique_ptr.h (struct hash<unique_ptr<>>): Likewise.
2011-07-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2011-07-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* crossconfig.m4 (*-netware): Remove. * crossconfig.m4 (*-netware): Remove.
......
...@@ -614,7 +614,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -614,7 +614,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// std::hash specialization for shared_ptr. /// std::hash specialization for shared_ptr.
template<typename _Tp> template<typename _Tp>
struct hash<shared_ptr<_Tp>> struct hash<shared_ptr<_Tp>>
: public std::unary_function<shared_ptr<_Tp>, size_t> : public __hash_base<size_t, shared_ptr<_Tp>>
{ {
size_t size_t
operator()(const shared_ptr<_Tp>& __s) const operator()(const shared_ptr<_Tp>& __s) const
......
...@@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// std::hash specialization for unique_ptr. /// std::hash specialization for unique_ptr.
template<typename _Tp, typename _Dp> template<typename _Tp, typename _Dp>
struct hash<unique_ptr<_Tp, _Dp>> struct hash<unique_ptr<_Tp, _Dp>>
: public std::unary_function<unique_ptr<_Tp, _Dp>, size_t> : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>
{ {
size_t size_t
operator()(const unique_ptr<_Tp, _Dp>& __u) const operator()(const unique_ptr<_Tp, _Dp>& __u) const
......
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