5
Quantities and units library
[quantities]
5.4
Reference
[qty.ref]
5.4.4
Unit
[qty.unit]
5.4.4.5
Types
[qty.unit.types]
5.4.4.5.1
Canonical
[qty.canon.unit]
🔗
namespace
mp_units
{
template
<
UnitMagnitude
M,
Unit
U
>
struct
canonical-unit
{
//
exposition only
M mag; U reference_unit;
}
;
}
1
#
canonical-unit
represents a unit expressed in terms of base units (
IEC 60050, 112-01-18
)
.
[
Note
1
:
Other types representing units are equal only if they have the same type
.
canonical-unit
is used to implement binary relations other than equality
.
—
end note
]
reference_
unit
is simplified (
[qty.
sym.
expr.
algos]
)
.
🔗
consteval
auto
get-canonical-unit
(
Unit
auto
u
)
;
//
exposition only
2
#
Returns
: The instantiation of
canonical-unit
for
u
.