diff --git a/include/boost/container_hash/hash.hpp b/include/boost/container_hash/hash.hpp index 1ff5d07..ae89a05 100644 --- a/include/boost/container_hash/hash.hpp +++ b/include/boost/container_hash/hash.hpp @@ -87,7 +87,8 @@ namespace boost static std::size_t fn( T v ) { // 4294967291 = 2^32-5, biggest prime under 2^32 - return static_cast( static_cast::type>( v ) % 4294967291 ); + // we use boost::uint32_t( -5 ), because g++ warns on 4294967291 + return static_cast( static_cast::type>( v ) % static_cast( -5 ) ); } };