[v3] libstdc++/48430

Submitted by Paolo Carlini on July 18, 2011, 4:09 p.m.

Details

Message ID 4E245ACD.4020704@oracle.com
State New
Headers show

Commit Message

Paolo Carlini July 18, 2011, 4:09 p.m.
Hi,

committed to mainline.

Paolo.

//////////////////////
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.

Patch hide | download patch | download mbox

Index: include/bits/shared_ptr.h
===================================================================
--- include/bits/shared_ptr.h	(revision 176398)
+++ include/bits/shared_ptr.h	(working copy)
@@ -614,7 +614,7 @@ 
   /// std::hash specialization for shared_ptr.
   template<typename _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
       operator()(const shared_ptr<_Tp>& __s) const
Index: include/bits/unique_ptr.h
===================================================================
--- include/bits/unique_ptr.h	(revision 176398)
+++ include/bits/unique_ptr.h	(working copy)
@@ -542,7 +542,7 @@ 
   /// std::hash specialization for unique_ptr.
   template<typename _Tp, typename _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
       operator()(const unique_ptr<_Tp, _Dp>& __u) const