aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-07-18 16:07:24 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-07-18 16:07:24 +0000
commit9992d564293ad265be00ffad5fc96908075acbde (patch)
treed19e0626e94f4a6be39ec536b25bd1b336f60c39
parent15e2b5959db53fce1355acf89faec7841aa7a89c (diff)
downloadgcc-9992d564293ad265be00ffad5fc96908075acbde.zip
gcc-9992d564293ad265be00ffad5fc96908075acbde.tar.gz
gcc-9992d564293ad265be00ffad5fc96908075acbde.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h2
-rw-r--r--libstdc++-v3/include/bits/unique_ptr.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 990fce9..5227dc0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index 2158de6..2c45f3d 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -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
diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h
index a6f457e..869d931 100644
--- a/libstdc++-v3/include/bits/unique_ptr.h
+++ b/libstdc++-v3/include/bits/unique_ptr.h
@@ -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