<!DOCTYPE html><htmllang='en'><head><title>[qty.unit.obs]</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#qty.unit.obs'>[qty.ref]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.4.4</a> Unit <aclass='abbr_ref'href='qty.unit.html#obs'>[qty.unit]</a></h3><h4><aclass='secnum'style='min-width:95pt'>5.4.4.8</a> Observers <aclass='abbr_ref'>[qty.unit.obs]</a></h4><divclass='texpara'><divid='lib:AssociatedUnit,get_quantity_spec'><divid='lib:get_quantity_spec,AssociatedUnit'><divclass='itemdecl'><divclass='marginalizedparent'><aclass='itemDeclLink'href='#lib:get_quantity_spec,AssociatedUnit'>🔗</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_quantity_spec<spanclass='parenthesis'>(</span><ahref='qty.unit.concepts.html#concept:AssociatedUnit'title='5.4.4.4 Concepts [qty.unit.concepts]'><spanid='conceptref:AssociatedUnit'><spanclass='texttt'>AssociatedUnit</span></span></a><spanclass='keyword'>auto</span> u<spanclass='parenthesis'>)</span>;
<ulclass='itemize'><liid='3.1'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#3.1'>(3.1)</a></div><spanclass='texttt'>u1</span> be <spanclass='texttt'>us<spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='squarebracket'>[</span><spanclass='literal'>0</span><spanclass='squarebracket'>]</span></span>,</li><liid='3.2'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#3.2'>(3.2)</a></div><spanclass='texttt'>u2</span> be <spanclass='texttt'>us<spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='squarebracket'>[</span><spanclass='literal'>1</span><spanclass='squarebracket'>]</span></span>,</li><liid='3.3'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#3.3'>(3.3)</a></div><spanclass='texttt'>U1</span> be <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>u1<spanclass='parenthesis'>)</span></span>,</li><liid='3.4'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#3.4'>(3.4)</a></div><spanclass='texttt'>U2</span> be <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>u2<spanclass='parenthesis'>)</span></span>, and</li><liid='3.5'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#3.5'>(3.5)</a></div><spanclass='texttt'>rest</span> be a pack denoting the elements of <spanclass='texttt'>us</span> without <spanclass='texttt'>u1</span> and <spanclass='texttt'>u2</span><aclass='hidden_link'href='#3.sentence-1'>.</a></li></ul></div></div></div></div><divclass='para'id='4'><divclass='marginalizedparent'><aclass='marginalized'href='#4'>4</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-unitse9c5f7236ebfe1b287a5a4a49aaf57fbefa87233/source/quantities.tex#L3179'>#</a></div><divclass='texpara'><divid='4.sentence-1'class='sentence'><i>Effects</i>: Equivalent to:
</span></div></div></div></div><divclass='para'id='5'><divclass='marginalizedparent'><aclass='marginalized'href='#5'>5</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-unitse9c5f7236ebfe1b287a5a4a49aaf57fbefa87233/source/quantities.tex#L3218'>#</a></div><divclass='texpara'><divid='5.sentence-1'class='sentence'><i>Remarks</i>: The expression in the <spanclass='textsf'><i>requires-clause</i></span> is equivalent to: