mp_units::pow

pow overloads

Synopses

Declared in <mp-units/framework/reference.h>

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

[[nodiscard]]
consteval
/* implementation-defined */
pow(reference r);
» more...

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); }
#if MP_UNITS_HOSTED
               || requires { std::pow(v, 1.0); }
#endif
               ;
  }
[[nodiscard]]
constexpr
quantity<pow<Num, Den>(R), Rep>
pow(quantity<R, Rep> const& q) noexcept;
» more...

Return Value

  • The result of computation
  • Quantity The result of computation

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
NumExponent numerator
DenExponent denominator

Parameters

NameDescription
rReference being the base of the operation
qQuantity being the base of the operation