[#mp_units-get_common_unit-08d] = xref:mp_units.adoc[mp_units]::get_common_unit :relfileprefix: ../ :mrdocs: Computes the common unit of a `common_unit` compound and a single new unit == Synopsis Declared in `<mp‐units/framework/unit_conversion.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Unit.adoc[Unit]... Us, /* implementation-defined */ NewUnit> [[nodiscard]] consteval xref:mp_units/Unit.adoc[Unit] auto get_common_unit( xref:mp_units/common_unit.adoc[common_unit<Us...>] cu, NewUnit new_unit); ---- == Return Value the common unit obtained by merging the new unit into the compound's unit list [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *cu* | the `common_unit` compound | *new_unit* | the new unit to merge into the compound's unit list |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#