From 943ef0ab82055525ee44832b34e2d0705e54e622 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 30 May 2022 02:19:54 +0300 Subject: [PATCH] Avoid -Wconversion with is_signed and enums --- include/boost/container_hash/hash.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/container_hash/hash.hpp b/include/boost/container_hash/hash.hpp index 391d9b7..eeaca31 100644 --- a/include/boost/container_hash/hash.hpp +++ b/include/boost/container_hash/hash.hpp @@ -25,8 +25,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -131,14 +133,14 @@ namespace boost } // namespace hash_detail template - typename boost::enable_if_::value && !boost::is_signed::value, std::size_t>::type + typename boost::enable_if_, boost::is_unsigned >::value, std::size_t>::type hash_value( T v ) { return hash_detail::hash_integral_impl::fn( v ); } template - typename boost::enable_if_::value && boost::is_signed::value, std::size_t>::type + typename boost::enable_if_, boost::is_signed >::value, std::size_t>::type hash_value( T v ) { typedef typename boost::make_unsigned::type U;