[#mp_units-quantity-01-numerical_value_ref_in-0d]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/quantity-01.adoc[quantity]::numerical&lowbar;value&lowbar;ref&lowbar;in
:relfileprefix: ../../
:mrdocs:

`numerical&lowbar;value&lowbar;ref&lowbar;in` overloads

== Synopses

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

Returns a mutable reference to the numerical value, in a unit equivalent to `unit`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/Unit.adoc[Unit] U&gt;
requires (equivalent(U&lcub;&rcub;, unit))
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/quantity-01/rep.adoc[rep]&
xref:mp_units/quantity-01/numerical_value_ref_in-098.adoc[numerical&lowbar;value&lowbar;ref&lowbar;in](U u) &amp; noexcept;
----

[.small]#xref:mp_units/quantity-01/numerical_value_ref_in-098.adoc[_» more&period;&period;&period;_]#

Returns a const reference to the numerical value, in a unit equivalent to `unit`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/Unit.adoc[Unit] U&gt;
requires (equivalent(U&lcub;&rcub;, unit))
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/quantity-01/rep.adoc[rep] const&
xref:mp_units/quantity-01/numerical_value_ref_in-095.adoc[numerical&lowbar;value&lowbar;ref&lowbar;in](U u) const &amp; noexcept;
----

[.small]#xref:mp_units/quantity-01/numerical_value_ref_in-095.adoc[_» more&period;&period;&period;_]#

Deleted overload that prevents forming a reference into a temporary quantity&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/Unit.adoc[Unit] U&gt;
requires (equivalent(U&lcub;&rcub;, unit))
constexpr
xref:mp_units/quantity-01/rep.adoc[rep] const&&
xref:mp_units/quantity-01/numerical_value_ref_in-01.adoc[numerical&lowbar;value&lowbar;ref&lowbar;in](U u) const &amp;&amp; noexcept = delete;
----

[.small]#xref:mp_units/quantity-01/numerical_value_ref_in-01.adoc[_» more&period;&period;&period;_]#

== Return Value

* A reference to the stored numerical value&period;
* A const reference to the stored numerical value&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *u*
| a unit equivalent to `unit`
|===


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