Index: boost/functional/hash/hash.hpp =================================================================== --- boost/functional/hash/hash.hpp (revision 67180) +++ boost/functional/hash/hash.hpp (working copy) @@ -24,6 +24,10 @@ #include #endif +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) +#include +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits @@ -87,6 +91,10 @@ std::size_t hash_value( std::basic_string, A> const&); +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + std::size_t hash_value(std::type_index const&); +#endif + // Implementation namespace hash_detail @@ -331,6 +339,14 @@ return boost::hash_detail::float_hash_value(v); } +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + inline std::size_t hash_value(std::type_index const& v) + { + return v.hash_code(); + } +#endif + + // // boost::hash // @@ -435,6 +451,10 @@ BOOST_HASH_SPECIALIZE(boost::ulong_long_type) #endif +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + BOOST_HASH_SPECIALIZE_REF(std::type_index) +#endif + #undef BOOST_HASH_SPECIALIZE #undef BOOST_HASH_SPECIALIZE_REF