10 #ifndef BOOST_BEAST_CORE_DETAIL_CLAMP_HPP 11 #define BOOST_BEAST_CORE_DETAIL_CLAMP_HPP 15 #include <type_traits> 26 if(x >= (std::numeric_limits<std::size_t>::max)())
27 return (std::numeric_limits<std::size_t>::max)();
28 return static_cast<std::size_t
>(x);
34 clamp(UInt x, std::size_t limit)
38 return static_cast<std::size_t
>(x);
43 class U1,
class U2,
class U3>
49 std::is_unsigned<U1>::value &&
50 std::is_unsigned<U2>::value &&
51 std::is_unsigned<U3>::value,
"");
52 return y > z || x > z - y;
Definition: async_result.hpp:20
constexpr bool sum_exceeds(U1 x, U2 y, U3 z)
Definition: clamp.hpp:46