diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e1a4764afd7a..f8eb55db79f7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-11-11 Jonathan Wakely + + * include/bits/shared_ptr.h (hash>): Use element_type. + * include/bits/shared_ptr_base.h (hash<__shared_ptr>): Likewise. + 2016-11-10 François Dumont * src/c++11/debug.cc (format_word): Delete. diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index 9f7a40c5e1ed..e562a42b3392 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -692,7 +692,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { size_t operator()(const shared_ptr<_Tp>& __s) const noexcept - { return std::hash<_Tp*>()(__s.get()); } + { + return std::hash::element_type*>()(__s.get()); + } }; // @} group pointer_abstractions diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 1a9e3e901e97..5e344b8e090b 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1681,7 +1681,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept - { return std::hash<_Tp*>()(__s.get()); } + { + return hash::element_type*>()( + __s.get()); + } }; _GLIBCXX_END_NAMESPACE_VERSION