[#mp_units-system_reference] = xref:mp_units.adoc[mp_units]::system_reference :relfileprefix: ../ :mrdocs: System‐specific reference == Synopsis Declared in `<mp‐units/framework/system_reference.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto Q, xref:mp_units/Unit.adoc[Unit] auto CoU> requires (!MP_UNITS_ASSOCIATED_UNIT_T(decltype(CoU))) || (CoU == one) struct system_reference; ---- == Member Functions [cols=2] |=== | Name | Description | xref:mp_units/system_reference/operator_subs.adoc[`operator[]`] | Subscript operator |=== == Static Data Members [cols=1] |=== | Name | xref:mp_units/system_reference/coherent_unit.adoc[`coherent_unit`] | xref:mp_units/system_reference/quantity_spec.adoc[`quantity_spec`] |=== == Description This type is used in rare cases where more than one base quantity in a specific system of units uses the same unit. For example in a hypothetical system of natural units where constant for speed of light `c = 1`, length and time could be measured in seconds. In such cases `system_reference` has to be used to explicitly express such a binding. For example: [,cpp] ---- {.cpp} // hypothetical natural system of units for c=1 inline constexpr struct second final : named_unit<"s"> {} second; inline constexpr struct minute final : named_unit<"min", mag<60> * second> {} minute; inline constexpr struct gram final : named_unit<"g"> {} gram; inline constexpr auto kilogram = si::kilo; inline constexpr struct time : system_reference {} time; inline constexpr struct length : system_reference {} length; inline constexpr struct speed : system_reference {} speed; inline constexpr struct force : system_reference {} force; ---- == Template Parameters [cols=2] |=== | Name | Description | *Q* | quantity for which a unit is being assigned | *CoU* | coherent unit for a quantity in this system |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#