Computes the value of a quantity raised to the Num/Den power

Synopses

Declared in <mp‐units/math.h>

[[nodiscard]]
consteval
/* implementation-defined */
pow(reference);

Computes the value of a quantity raised to the Num/Den power

template<
    intmax_t Num,
    intmax_t Den = 1,
    auto R,
    typename Rep>
requires (Den != 0) && requires(Rep v) {
    representation_values<Rep>::one();
    requires requires { pow(v, 1.0); } || requires { std::pow(v, 1.0); };
  }
[[nodiscard]]
constexpr
quantity<pow<Num, Den>®, Rep>
pow(quantity<R, Rep> const& q) noexcept;

Return Value

Quantity The result of computation

Template Parameters

Name Description

Num

Exponent numerator

Den

Exponent denominator

Parameters

Name Description

q

Quantity being the base of the operation

Created with MrDocs