head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.4 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.1.0.2 pkgsrc-2012Q3-base:1.1; locks; strict; comment @// @; 1.2 date 2012.11.20.14.57.52; author adam; state dead; branches; next 1.1; 1.1 date 2012.08.31.12.20.56; author adam; state Exp; branches; next ; desc @@ 1.2 log @This patch is not needed any more @ text @$NetBSD: patch-boost_functional_hash_hash.hpp,v 1.1 2012/08/31 12:20:56 adam Exp $ Allow hashing enums. --- boost/functional/hash/hash.hpp.orig 2012-07-15 23:28:30.000000000 +0000 +++ boost/functional/hash/hash.hpp @@@@ -15,6 +15,8 @@@@ #include #include #include +#include +#include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include @@@@ -90,6 +92,10 @@@@ namespace boost template typename boost::hash_detail::ulong_numbers::type hash_value(T); + template + typename boost::enable_if, std::size_t>::type + hash_value(T); + #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template std::size_t hash_value(T* const&); #else @@@@ -179,6 +185,13 @@@@ namespace boost return hash_detail::hash_value_unsigned(v); } + template + typename boost::enable_if, std::size_t>::type + hash_value(T v) + { + return static_cast(v); + } + // Implementation by Alberto Barbati and Dave Harris. #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template std::size_t hash_value(T* const& v) @ 1.1 log @Fix hash_value() issue in boost-1.51.0 @ text @d1 1 a1 1 $NetBSD$ @