System‐specific reference
Synopsis
Declared in <mp‐units/framework/system_reference.h>
template<
    QuantitySpec auto Q,
    Unit auto CoU>
requires (!MP_UNITS_ASSOCIATED_UNIT_T(decltype(CoU))) || (CoU == one)
struct system_reference;Member Functions
| Name | Description | 
| Subscript operator | 
Static Data Members
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}
 // 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<gram>;
 inline constexpr struct time : system_reference<isq::time, second> {} time;
 inline constexpr struct length : system_reference<isq::length, second> {} length;
 inline constexpr struct speed : system_reference<isq::speed, second / second> {} speed;
 inline constexpr struct force : system_reference<isq::force, kilogram / second> {} force;Template Parameters
| Name | Description | 
| Q | quantity for which a unit is being assigned | 
| CoU | coherent unit for a quantity in this system | 
Created with MrDocs