re PR libstdc++/48430 (std::hash partial specialization for std::unique_ptr and std...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 18 Jul 2011 16:07:24 +0000 (16:07 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 18 Jul 2011 16:07:24 +0000 (16:07 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr.h
libstdc++-v3/include/bits/unique_ptr.h

index 990fce997cec18d7885b00c21f7337ab8b8e0c34..5227dc02b3196b6a93b755ffa5e0cffde6063a5b 100644 (file)
@@ -1,3 +1,10 @@
+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>
 
        * crossconfig.m4 (*-netware): Remove.
index 2158de6bf81ddd367c341d32e84ece6b4a97922d..2c45f3d7ba3b28c53593e54168aefd740c87f0e7 100644 (file)
@@ -614,7 +614,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /// 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 a6f457ee59e33a226ac870075f35110265ea9c9a..869d931330c1f23ac143036bbd961b2713b27f2b 100644 (file)
@@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /// 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