cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Namespace for compile-time static (template based) arithmetic operations. More...
Classes | |
struct | midpoint |
Defines the member value , with value of type Int that is the numeric value at the middle between a and b. More... | |
struct | static_abs |
Provides the member value with one of the values [-u, 0, +u] depending on the sign of u . More... | |
struct | static_abs_s |
Absolute value of a intmax_t . More... | |
struct | static_abs_u |
Absolute value of a uintmax_t . More... | |
struct | static_clamp |
Defines the member value which is t, constrained to the range [m,M] . More... | |
struct | static_intlog |
Provides the member value with the value of the logarithm of N in base Ba . More... | |
struct | static_intpow |
Defines the member value , of type Int and of value equal to x to the power of y . More... | |
struct | static_minmax2 |
Defines the member values Tmin , Tmax with the minimum or maximum value between t0 and t1 . More... | |
struct | static_sign |
Provides the member value with the sign of template parameter T u . More... | |
struct | static_sign_s |
Sign of a intmax_t . More... | |
struct | static_sign_u |
Sign of a uintmax_t . More... | |
Namespace for compile-time static (template based) arithmetic operations.
struct cxxomfort::st_math::static_sign |
Provides the member value
with the sign of template parameter T u .
u | A compile-time value of type T used as argument. |
The helper types static_sign_s
and statuc_sign_u
omit the parameter types and operate on intmax_t
and uintmax_t
values, respectively.
See also static_abs
.