[#mp_units-get_common_unit-0d] = xref:mp_units.adoc[mp_units]::get_common_unit :relfileprefix: ../ :mrdocs: Computes the common unit of two convertible units == Synopsis Declared in `<mp‐units/framework/reference.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Unit.adoc[Unit] U1, /* implementation-defined */ U2> [[nodiscard]] consteval xref:mp_units/Unit.adoc[Unit] auto get_common_unit( U1 u1, U2 u2); ---- == Return Value the common unit of `u1` and `u2` [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *u1* | first unit | *u2* | second unit |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#