cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
List of all members
static_intpow< Int, x, y > Struct Template Reference

Defines the member value , of type Int and of value equal to x to the power of y . More...

Detailed Description

template<typename Int, Int x, unsigned y>
struct cxxomfort::st_math::static_intpow< Int, x, y >

Defines the member value , of type Int and of value equal to x to the power of y .

Utilities:
Compile-time integer exponentiation, pre-C++11.
intmax_t mega = st_math::static_intpow<intmax_t,10,6>::value;
Note
static_intpow ignores overflow or underflow on the integral types used, so care must be taken to choose a type T that can host the result value.

See also: static_intlog , static_sqrt .


The documentation for this struct was generated from the following file: