[#mp_units-reference] = xref:mp_units.adoc[mp_units]::reference :relfileprefix: ../ :mrdocs: Quantity reference type == Synopsis Declared in `<mp‐units/framework/reference.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q, xref:mp_units/Unit.adoc[Unit] U> struct reference; ---- == Friends [cols=2] |=== | Name | Description | `xref:mp_units/cbrt-0e.adoc[mp_units::cbrt]` | | `xref:mp_units/sqrt-0f.adoc[mp_units::sqrt]` | | `xref:mp_units/pow-07.adoc[mp_units::pow]` | Computes the value of a reference raised to the `Num/Den` power | `xref:mp_units/inverse-0b.adoc[mp_units::inverse]` | | `xref:mp_units/operator_slash-0d6.adoc[mp_units::operator/]` | | `xref:mp_units/operator_slash-0e7.adoc[mp_units::operator/]` | | `xref:mp_units/operator_slash-0d3.adoc[mp_units::operator/]` | | `xref:mp_units/operator_star-02b.adoc[mp_units::operator*]` | | `xref:mp_units/operator_star-0f.adoc[mp_units::operator*]` | | `xref:mp_units/operator_star-05.adoc[mp_units::operator*]` | | `xref:mp_units/operator_eq-02.adoc[mp_units::operator==]` | Equality operator | `xref:mp_units/operator_eq-07.adoc[mp_units::operator==]` | Equality operator |=== == Description Quantity reference describes all the properties of a quantity besides its representation type. In most cases this class template is not explicitly instantiated by the user. It is implicitly instantiated by the library's framework while binding a quantity specification with a compatible unit. [,cpp] ---- {.cpp} Reference auto kmph = isq::speed[km / h]; QuantityOf auto speed = 90 * kmph; ---- The following syntaxes are not allowed: `2 / kmph`, `kmph * 3`, `kmph / 4`, `70 * isq::length[km] / isq:time[h]`. [.small]#Created with https://www.mrdocs.com[MrDocs]#