[#mp_units-pow-00]
= xref:mp_units.adoc[mp&lowbar;units]::pow
:relfileprefix: ../
:mrdocs:

`pow` overloads

== Synopses

Declared in `&lt;mp&hyphen;units&sol;framework&sol;dimension&period;h&gt;`

Computes the value of a reference raised to the `Num&sol;Den` power


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    intmax&lowbar;t Num,
    intmax&lowbar;t Den = 1&gt;
requires (Den !&equals; 0)
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
&sol;&ast; implementation-defined &ast;&sol;
xref:mp_units/pow-0b.adoc[pow](xref:mp_units/reference.adoc[reference]);
----

[.small]#xref:mp_units/pow-0b.adoc[_» more&period;&period;&period;_]#

Computes the value of a dimension raised to the `Num&sol;Den` power


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    intmax&lowbar;t Num,
    intmax&lowbar;t Den = 1,
    xref:mp_units/Unit.adoc[Unit] D&gt;
requires (Den !&equals; 0)
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto
xref:mp_units/pow-07.adoc[pow](D d);
----

[.small]#xref:mp_units/pow-07.adoc[_» more&period;&period;&period;_]#

Computes the value of a quantity raised to the `Num&sol;Den` power


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    intmax&lowbar;t Num,
    intmax&lowbar;t Den = 1,
    auto R,
    typename Rep&gt;
requires (Den !&equals; 0) &amp;&amp; requires(Rep v) &lcub;
    representation&lowbar;values&lt;Rep&gt;&colon;&colon;one()&semi;
    requires requires &lcub; pow(v, 1&period;0)&semi; &rcub; &verbar;&verbar; requires &lcub; std&colon;&colon;pow(v, 1&period;0)&semi; &rcub;&semi;
  &rcub;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/quantity-01.adoc[quantity&lt;pow&lt;Num, Den&gt;(R), Rep&gt;]
xref:mp_units/pow-05.adoc[pow](xref:mp_units/quantity-01.adoc[quantity&lt;R, Rep&gt;] const& q) noexcept;
----

[.small]#xref:mp_units/pow-05.adoc[_» more&period;&period;&period;_]#

== Return Value

* The result of computation
* Dimension The result of computation
* QuantitySpec The result of computation
* Unit The result of computation
* Quantity The result of computation

== Template Parameters

[cols=2]
|===
| Name
| Description
| *Num*
| Exponent numerator
| *Den*
| Exponent denominator
|===

== Parameters

[cols=2]
|===
| Name
| Description
| *r*
| Reference being the base of the operation
| *d*
| Dimension being the base of the operation
| *q*
| Quantity specification being the base of the operation
| *u*
| Unit being the base of the operation
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
