[#mp_units-get_common_quantity_spec-08] = xref:mp_units.adoc[mp_units]::get_common_quantity_spec :relfileprefix: ../ :mrdocs: `get_common_quantity_spec` overloads == Synopses Declared in `<mp‐units/framework/quantity_spec_conversion.h>` Returns the common quantity specification of a single quantity specification [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto xref:mp_units/get_common_quantity_spec-04.adoc[get_common_quantity_spec](auto q); ---- [.small]#xref:mp_units/get_common_quantity_spec-04.adoc[_» more..._]# Returns the common quantity specification of two quantity specifications [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q1, xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q2> requires (detail::have_common_quantity_spec(Q1{}, Q2{})) [[nodiscard]] consteval xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto xref:mp_units/get_common_quantity_spec-0b.adoc[get_common_quantity_spec]( Q1 q1, Q2 q2); ---- [.small]#xref:mp_units/get_common_quantity_spec-0b.adoc[_» more..._]# Returns the common quantity specification of three or more quantity specifications [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto xref:mp_units/get_common_quantity_spec-0a.adoc[get_common_quantity_spec]( auto q1, auto q2, auto q3, auto... rest) requires requires { mp_units::get_common_quantity_spec(mp_units::get_common_quantity_spec(q1, q2), q3, rest...); }; ---- [.small]#xref:mp_units/get_common_quantity_spec-0a.adoc[_» more..._]# == Return Value * `q` unchanged * the strongest quantity specification that both arguments are convertible to * the common quantity specification obtained by folding all arguments pairwise [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Template Parameters [cols="1,4"] |=== | Name| Description | *Q1* | first quantity specification type | *Q2* | second quantity specification type |=== == Parameters [cols="1,4"] |=== | Name| Description | *q* | a quantity specification value | *q1* | first quantity specification value | *q2* | second quantity specification value | *q3* | third quantity specification value | *rest* | any remaining quantity specification values |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#