<!DOCTYPE html><htmllang='en'><head><title>[get.common.qty.spec]</title><metacharset='UTF-8'/><linkrel='stylesheet'type='text/css'href='14882.css'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Serif'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Sans'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Sans+Mono'/><linkrel='icon'href='icon.png'/><linkrel='stylesheet'type='text/css'href='expanded.css'title='Normal'/><linkrel='alternate stylesheet'type='text/css'href='colored.css'title='Notes and examples colored'/><linkrel='alternate stylesheet'type='text/css'href='normative-only.css'title='Notes and examples hidden'/></head><body><divclass='wrapper'><h1><aclass='secnum'style='min-width:50pt'>5</a> Quantities and units library <aclass='abbr_ref'href='index.html#quantities'>[quantities]</a></h1><h2><aclass='secnum'style='min-width:65pt'>5.4</a> Reference <aclass='abbr_ref'href='qty.ref.html#get.common.qty.spec'>[qty.ref]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.4.3</a> Quantity specification <aclass='abbr_ref'href='qty.spec.html#get.common.qty.spec'>[qty.spec]</a></h3><h4><aclass='secnum'style='min-width:95pt'>5.4.3.6</a> Hierarchy algorithms <aclass='abbr_ref'href='qty.spec.hier.algos.html#get.common.qty.spec'>[qty.spec.hier.algos]</a></h4><h4><aclass='secnum'style='min-width:110pt'>5.4.3.6.3</a> Get common quantity specification <aclass='abbr_ref'>[get.common.qty.spec]</a></h4><divclass='texpara'><divid='lib:QuantitySpec,get_common_quantity_spec'><divid='lib:get_common_quantity_spec,QuantitySpec'><divclass='itemdecl'><divclass='marginalizedparent'><aclass='itemDeclLink'href='#lib:get_common_quantity_spec,QuantitySpec'>🔗</a></div><codeclass='itemdeclcode'><spanclass='keyword'>consteval</span><ahref='qty.spec.concepts.html#concept:QuantitySpec'title='5.4.3.2 Concepts [qty.spec.concepts]'><spanid='conceptref:QuantitySpec'><spanclass='texttt'>QuantitySpec</span></span></a><spanclass='keyword'>auto</span> get_common_quantity_spec<spanclass='parenthesis'>(</span><ahref='qty.spec.concepts.html#concept:QuantitySpec'title='5.4.3.2 Concepts [qty.spec.concepts]'><spanid='conceptref:QuantitySpec_'><spanclass='texttt'>QuantitySpec</span></span></a><spanclass='keyword'>auto</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span> qs<spanclass='parenthesis'>)</span>
<ulclass='itemize'><liid='1.1'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.1'>(1.1)</a></div><spanclass='texttt'>q1</span> be <spanclass='texttt'>qs<spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='squarebracket'>[</span><spanclass='literal'>0</span><spanclass='squarebracket'>]</span></span>,</li><liid='1.2'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.2'>(1.2)</a></div><spanclass='texttt'>q2</span> be <spanclass='texttt'>qs<spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='squarebracket'>[</span><spanclass='literal'>1</span><spanclass='squarebracket'>]</span></span>,</li><liid='1.3'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.3'>(1.3)</a></div><spanclass='texttt'>Q1</span> be <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>q1<spanclass='parenthesis'>)</span></span>,</li><liid='1.4'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.4'>(1.4)</a></div><spanclass='texttt'>Q2</span> be <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>q2<spanclass='parenthesis'>)</span></span>, and</li><liid='1.5'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.5'>(1.5)</a></div><spanclass='texttt'>rest</span> be a pack denoting the elements of <spanclass='texttt'>qs</span> without <spanclass='texttt'>q1</span> and <spanclass='texttt'>q2</span><aclass='hidden_link'href='#1.sentence-1'>.</a></li></ul></div></div></div></div><divclass='para'id='2'><divclass='marginalizedparent'><aclass='marginalized'href='#2'>2</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L2162'>#</a></div><divclass='texpara'><divid='2.sentence-1'class='sentence'><i>Effects</i>: Equivalent to:
</span></div></div></div></div><divclass='para'id='3'><divclass='marginalizedparent'><aclass='marginalized'href='#3'>3</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L2201'>#</a></div><divclass='texpara'><divid='3.sentence-1'class='sentence'><i>Remarks</i>: The expression in the <spanclass='textsf'><i>requires-clause</i></span> is equivalent to: