Ticket #4756: hash.diff
File hash.diff, 1.3 KB (added by , 12 years ago) |
---|
-
boost/functional/hash/hash.hpp
24 24 #include <boost/type_traits/is_pointer.hpp> 25 25 #endif 26 26 27 #if !defined(BOOST_NO_0X_HDR_TYPEINDEX) 28 #include <typeindex> 29 #endif 30 27 31 #if BOOST_WORKAROUND(__GNUC__, < 3) \ 28 32 && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) 29 33 #define BOOST_HASH_CHAR_TRAITS string_char_traits … … 87 91 std::size_t hash_value( 88 92 std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&); 89 93 94 #if !defined(BOOST_NO_0X_HDR_TYPEINDEX) 95 std::size_t hash_value(std::type_index const&); 96 #endif 97 90 98 // Implementation 91 99 92 100 namespace hash_detail … … 331 339 return boost::hash_detail::float_hash_value(v); 332 340 } 333 341 342 #if !defined(BOOST_NO_0X_HDR_TYPEINDEX) 343 inline std::size_t hash_value(std::type_index const& v) 344 { 345 return v.hash_code(); 346 } 347 #endif 348 349 334 350 // 335 351 // boost::hash 336 352 // … … 435 451 BOOST_HASH_SPECIALIZE(boost::ulong_long_type) 436 452 #endif 437 453 454 #if !defined(BOOST_NO_0X_HDR_TYPEINDEX) 455 BOOST_HASH_SPECIALIZE_REF(std::type_index) 456 #endif 457 438 458 #undef BOOST_HASH_SPECIALIZE 439 459 #undef BOOST_HASH_SPECIALIZE_REF 440 460