<mp-units/framework/unit.h>
template<
symbol_text Symbol,
Unit auto QS>
requires (!Symbol.empty())
struct named_unit<Symbol, U>
: /* implementation-defined */
Name | Description |
---|---|
/* implementation-defined */ |
Name |
---|
_base_type_ |
Name | Description |
---|---|
_quantity_spec_ | |
_symbol_ | Unique base unit identifier |
Associates a unit with a specified base quantity. For example si::metre
is a unit to measure isq::length
in the SI system.
This is the preferred way to define a measurement unit for a specific base quantity.
It does not have to (or sometimes even can't) be a proper system's base unit. For example a base unit of mass in the SI is si::kilogram
but here you are about to provide an si::gram
and it will work just fine as those two are convertible to each other. A similar case would be the cgs::centimetre
that is a base unit for isq::length
in the CGS system.
Allows assigning a special name to another scaled or derived unit (e.g. hour
, joule
).
Name | Description |
---|---|
Symbol | a short text representation of the unit |
QuantitySpec | a specification of a base quantity to be measured with this unit |
Unit | a unit for which we provide a special name |