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

Quantity reference type

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q,
    xref:mp_units/Unit.adoc[Unit] U&gt;
struct reference;
----

== Friends

[cols=2]
|===
| Name
| Description
| `xref:mp_units/cbrt-0e.adoc[mp&lowbar;units::cbrt]`
| 
| `xref:mp_units/sqrt-0f.adoc[mp&lowbar;units::sqrt]`
| 
| `xref:mp_units/pow-07.adoc[mp&lowbar;units::pow]`
| Computes the value of a reference raised to the `Num&sol;Den` power
| `xref:mp_units/inverse-0b.adoc[mp&lowbar;units::inverse]`
| 
| `xref:mp_units/operator_slash-0d6.adoc[mp&lowbar;units::operator&sol;]`
| 
| `xref:mp_units/operator_slash-0e7.adoc[mp&lowbar;units::operator&sol;]`
| 
| `xref:mp_units/operator_slash-0d3.adoc[mp&lowbar;units::operator&sol;]`
| 
| `xref:mp_units/operator_star-02b.adoc[mp&lowbar;units::operator&ast;]`
| 
| `xref:mp_units/operator_star-0f.adoc[mp&lowbar;units::operator&ast;]`
| 
| `xref:mp_units/operator_star-05.adoc[mp&lowbar;units::operator&ast;]`
| 
| `xref:mp_units/operator_eq-02.adoc[mp&lowbar;units::operator&equals;&equals;]`
| Equality operator
| `xref:mp_units/operator_eq-07.adoc[mp&lowbar;units::operator&equals;&equals;]`
| Equality operator
|===

== Description

Quantity reference describes all the properties of a quantity besides its representation type&period;

In most cases this class template is not explicitly instantiated by the user&period; It is implicitly instantiated by the library&apos;s framework while binding a quantity specification with a compatible unit&period;

[,cpp]
----
{.cpp}
 Reference auto kmph = isq::speed[km / h];
 QuantityOf<isq::speed[km / h]> auto speed = 90 * kmph;
----
The following syntaxes are not allowed&colon; `2 &sol; kmph`, `kmph &ast; 3`, `kmph &sol; 4`, `70 &ast; isq&colon;&colon;length&lsqb;km&rsqb; &sol; isq&colon;time&lsqb;h&rsqb;`&period;


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