[#mp_units-get_canonical_unit] = xref:mp_units.adoc[mp_units]::get_canonical_unit :relfileprefix: ../ :mrdocs: Computes the canonical form of a unit == Synopsis Declared in `<mp‐units/framework/unit_concepts.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval auto get_canonical_unit(auto u); ---- == Description The canonical form reduces a unit to its reference unit expressed only in terms of base units together with the unit magnitude needed to reach it, so that units can be compared for compatibility and converted between each other. == Return Value the canonical form of `u` [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *u* | unit to compute the canonical form of |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#