Index: include/debug/bitset =================================================================== --- include/debug/bitset (revision 164526) +++ include/debug/bitset (working copy) @@ -385,7 +385,7 @@ /// std::hash specialization for bitset. template struct hash<__debug::bitset<_Nb>> - : public std::unary_function<__debug::bitset<_Nb>, size_t> + : public __hash_base> { size_t operator()(const __debug::bitset<_Nb>& __b) const Index: include/debug/vector =================================================================== --- include/debug/vector (revision 164526) +++ include/debug/vector (working copy) @@ -584,7 +584,7 @@ /// std::hash specialization for vector. template struct hash<__debug::vector> - : public std::unary_function<__debug::vector, size_t> + : public __hash_base> { size_t operator()(const __debug::vector& __b) const Index: include/std/system_error =================================================================== --- include/std/system_error (revision 164526) +++ include/std/system_error (working copy) @@ -353,7 +353,7 @@ /// std::hash specialization for error_code. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const error_code& __e) const Index: include/std/thread =================================================================== --- include/std/thread (revision 164526) +++ include/std/thread (working copy) @@ -56,9 +56,6 @@ * @{ */ - template - struct hash; - /// thread class thread { @@ -224,7 +221,7 @@ /// std::hash specialization for thread::id. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const thread::id& __id) const Index: include/std/bitset =================================================================== --- include/std/bitset (revision 164526) +++ include/std/bitset (working copy) @@ -1495,7 +1495,7 @@ /// std::hash specialization for bitset. template struct hash<_GLIBCXX_STD_D::bitset<_Nb>> - : public std::unary_function<_GLIBCXX_STD_D::bitset<_Nb>, size_t> + : public __hash_base> { size_t operator()(const _GLIBCXX_STD_D::bitset<_Nb>& __b) const @@ -1507,7 +1507,7 @@ template<> struct hash<_GLIBCXX_STD_D::bitset<0>> - : public std::unary_function<_GLIBCXX_STD_D::bitset<0>, size_t> + : public __hash_base> { size_t operator()(const _GLIBCXX_STD_D::bitset<0>&) const Index: include/std/typeindex =================================================================== --- include/std/typeindex (revision 164526) +++ include/std/typeindex (working copy) @@ -35,9 +35,7 @@ # include #else -#include #include -#include // For unary_function namespace std { @@ -92,8 +90,10 @@ /// std::hash specialization for type_index. template<> struct hash - : public std::unary_function { + typedef size_t result_type; + typedef type_index argument_type; + size_t operator()(const type_index& __ti) const { return __ti.hash_code(); } Index: include/profile/bitset =================================================================== --- include/profile/bitset (revision 164526) +++ include/profile/bitset (working copy) @@ -359,7 +359,7 @@ /// std::hash specialization for bitset. template struct hash<__profile::bitset<_Nb>> - : public std::unary_function<__profile::bitset<_Nb>, size_t> + : public __hash_base> { size_t operator()(const __profile::bitset<_Nb>& __b) const Index: include/profile/vector =================================================================== --- include/profile/vector (revision 164526) +++ include/profile/vector (working copy) @@ -505,7 +505,7 @@ /// std::hash specialization for vector. template struct hash<__profile::vector> - : public std::unary_function<__profile::vector, size_t> + : public __hash_base> { size_t operator()(const __profile::vector& __b) const Index: include/bits/functional_hash.h =================================================================== --- include/bits/functional_hash.h (revision 164526) +++ include/bits/functional_hash.h (working copy) @@ -33,7 +33,6 @@ #pragma GCC system_header #include -#include namespace std { @@ -45,9 +44,16 @@ * @{ */ + template + struct __hash_base + { + typedef _Result result_type; + typedef _Arg argument_type; + }; + /// Primary class template hash. template - struct hash : public std::unary_function<_Tp, size_t> + struct hash : public __hash_base { size_t operator()(_Tp __val) const; @@ -55,7 +61,7 @@ /// Partial specializations for pointer types. template - struct hash<_Tp*> : public std::unary_function<_Tp*, size_t> + struct hash<_Tp*> : public __hash_base { size_t operator()(_Tp* __p) const Index: include/bits/basic_string.h =================================================================== --- include/bits/basic_string.h (revision 164526) +++ include/bits/basic_string.h (working copy) @@ -2925,7 +2925,7 @@ /// std::hash specialization for string. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const string& __s) const @@ -2936,7 +2936,7 @@ /// std::hash specialization for wstring. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const wstring& __s) const @@ -2950,7 +2950,7 @@ /// std::hash specialization for u16string. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const u16string& __s) const @@ -2961,7 +2961,7 @@ /// std::hash specialization for u32string. template<> struct hash - : public std::unary_function + : public __hash_base { size_t operator()(const u32string& __s) const Index: include/bits/stl_bvector.h =================================================================== --- include/bits/stl_bvector.h (revision 164526) +++ include/bits/stl_bvector.h (working copy) @@ -1038,7 +1038,7 @@ /// std::hash specialization for vector. template struct hash<_GLIBCXX_STD_D::vector> - : public std::unary_function<_GLIBCXX_STD_D::vector, size_t> + : public __hash_base> { size_t operator()(const _GLIBCXX_STD_D::vector& __b) const;