|
template<typename T , std::enable_if_t< std::is_integral< T >::value &&std::is_unsigned< T >::value, bool > = true> |
constexpr T | add_bounded (const T x, const T y, const T maximum) |
| Return x+y, limited to the given maximum. More...
|
|
template<typename T , typename T2 , std::enable_if_t< std::is_integral< T >::value &&std::is_unsigned< T >::value &&std::is_arithmetic< T2 >::value, bool > = true> |
constexpr T | multiply_bounded (const T x, const T2 y, const T maximum) |
| Return x*y, limited to the given maximum. More...
|
|
template<typename T , std::enable_if_t< std::is_integral< T >::value &&std::is_unsigned< T >::value, bool > = true> |
constexpr T | ceil_div (const T x, const T y) |
| Return ceil(x / y), where x and y are unsigned integer types. More...
|
|