[#mp_units-get_common_reference]
= xref:mp_units.adoc[mp&lowbar;units]::get&lowbar;common&lowbar;reference
:relfileprefix: ../
:mrdocs:

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;reference&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/Reference.adoc[Reference] R1,
    xref:mp_units/Reference.adoc[Reference] R2,
    xref:mp_units/Reference.adoc[Reference]&period;&period;&period; Rest&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
xref:mp_units/Reference.adoc[Reference] auto
get&lowbar;common&lowbar;reference(
    auto u1,
    auto u2,
    auto&period;&period;&period; rest)
requires (!(Unit&lt;R1&gt; &amp;&amp; Unit&lt;R2&gt; &amp;&amp; (&period;&period;&period; &amp;&amp; Unit&lt;Rest&gt;))) &amp;&amp; requires &lcub;
    mp&lowbar;units&colon;&colon;get&lowbar;common&lowbar;quantity&lowbar;spec(get&lowbar;quantity&lowbar;spec(r1), get&lowbar;quantity&lowbar;spec(r2), get&lowbar;quantity&lowbar;spec(rest)&period;&period;&period;)&semi;
    mp&lowbar;units&colon;&colon;get&lowbar;common&lowbar;unit(get&lowbar;unit(r1), get&lowbar;unit(r2), get&lowbar;unit(rest)&period;&period;&period;)&semi;
  &rcub;;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
