--- boost/type_traits/is_unsigned.hpp.orig 2025-08-06 18:49:14 UTC +++ boost/type_traits/is_unsigned.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -26,6 +27,18 @@ namespace detail{ namespace detail{ +template +struct is_unsigned_values_underlying_type +{ + typedef no_cv_t underlying_type; +}; + +template +struct is_unsigned_values_underlying_type +{ + typedef typename ::boost::underlying_type::type underlying_type; +}; + template struct is_unsigned_values { @@ -35,8 +48,10 @@ struct is_unsigned_values // the correct answer. // typedef typename remove_cv::type no_cv_t; - static const no_cv_t minus_one = (static_cast(-1)); - static const no_cv_t zero = (static_cast(0)); + typedef typename is_unsigned_values_underlying_type::value>::underlying_type underlying_type; + + static const underlying_type minus_one = (static_cast(-1)); + static const underlying_type zero = (static_cast(0)); }; template