MySQL 8.0.39
Source Code Documentation
|
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | mysqlns |
namespace | mysqlns::math |
Functions | |
template<typename T , std::enable_if_t< std::is_integral< T >::value &&std::is_unsigned< T >::value, bool > = true> | |
constexpr T | mysqlns::math::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 | mysqlns::math::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 | mysqlns::math::ceil_div (const T x, const T y) |
Return ceil(x / y), where x and y are unsigned integer types. More... | |