[#mp_units-pow-00] = xref:mp_units.adoc[mp_units]::pow :relfileprefix: ../ :mrdocs: `pow` overloads == Synopses Declared in `<mp‐units/framework/reference.h>` Computes the value of a reference raised to the `Num/Den` power [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval /* implementation-defined */ xref:mp_units/pow-04.adoc[pow](xref:mp_units/reference-0b2.adoc[reference] r); ---- [.small]#xref:mp_units/pow-04.adoc[_» more..._]# Computes the value of a quantity raised to the `Num/Den` power [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 xref:mp_units/quantity-01.adoc[quantity<pow<Num, Den>(R), Rep>] xref:mp_units/pow-06.adoc[pow](xref:mp_units/quantity-01.adoc[quantity<R, Rep>] const& q) noexcept; ---- [.small]#xref:mp_units/pow-06.adoc[_» more..._]# == Return Value * The result of computation * Quantity The result of computation [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Template Parameters [cols="1,4"] |=== | Name| Description | *Num* | Exponent numerator | *Den* | Exponent denominator |=== == Parameters [cols="1,4"] |=== | Name| Description | *r* | Reference being the base of the operation | *q* | Quantity being the base of the operation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#