<!DOCTYPE html><htmllang='en'><head><title>[assoc.qty]</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#assoc.qty'>[qty.ref]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.4.4</a> Unit <aclass='abbr_ref'href='qty.unit.html#assoc.qty'>[qty.unit]</a></h3><h4><aclass='secnum'style='min-width:95pt'>5.4.4.9</a> Associated quantity <aclass='abbr_ref'>[assoc.qty]</a></h4><divclass='texpara'><divid='lib:has-associated-quantity,Unit'><divid='lib:Unit,has-associated-quantity'><divclass='itemdecl'><divclass='marginalizedparent'><aclass='itemDeclLink'href='#lib:Unit,has-associated-quantity'>🔗</a></div><codeclass='itemdeclcode'><spanclass='keyword'>template</span><spanclass='anglebracket'><</span><ahref='qty.unit.concepts.html#concept:Unit'title='5.4.4.4 Concepts [qty.unit.concepts]'><spanid='conceptref:Unit'><spanclass='texttt'>Unit</span></span></a> U<spanclass='anglebracket'>></span>
</code></div></div></div></div><divclass='para'id='1'><divclass='marginalizedparent'><aclass='marginalized'href='#1'>1</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-unitse9c5f7236ebfe1b287a5a4a49aaf57fbefa87233/source/quantities.tex#L3237'>#</a></div><divclass='texpara'><divid='1.sentence-1'class='sentence'><i>Returns</i>: <ulclass='itemize'><liid='1.1'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.1'>(1.1)</a></div><divclass='texpara'><divid='1.1.sentence-1'class='sentence'>If <spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>quantity-spec</i></span></span> is a valid expression,
returns <spanclass='texttt'><spanclass='literal'>true</span></span><aclass='hidden_link'href='#1.1.sentence-1'>.</a></div></div></li><liid='1.2'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.2'>(1.2)</a></div><divclass='texpara'><divid='1.2.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>reference-unit</i></span></span> is a valid expression,
</span></div></div></li><liid='1.3'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#1.3'>(1.3)</a></div><divclass='texpara'><divid='1.3.sentence-1'class='sentence'>Otherwise, if
is <spanclass='texttt'><spanclass='literal'>true</span></span>,
let <spanclass='texttt'>Nums</span> and <spanclass='texttt'>Dens</span>
be packs denoting the template arguments of
<spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>nums</i></span></span> and <spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>dens</i></span></span>, respectively<aclass='hidden_link'href='#1.3.sentence-1'>.</a></div><divid='1.3.sentence-2'class='sentence'>Returns
</code></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-unitse9c5f7236ebfe1b287a5a4a49aaf57fbefa87233/source/quantities.tex#L3273'>#</a></div><divclass='texpara'><divid='2.sentence-1'class='sentence'><i>Returns</i>: <ulclass='itemize'><liid='2.1'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#2.1'>(2.1)</a></div>If <spanclass='texttt'>U</span> is of the form <spanclass='texttt'>common_<spanclass='shy'></span>unit<spanclass='anglebracket'><</span>Us<spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='operator'>.</span><spanclass='anglebracket'>></span></span>,
</span></li><liid='2.2'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#2.2'>(2.2)</a></div>Otherwise, if <spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>quantity-spec</i></span></span> is a valid expression,
</span></li><liid='2.3'><divclass='marginalizedparent'style='left:-39mm'><aclass='marginalized'href='#2.3'>(2.3)</a></div>Otherwise, if <spanclass='texttt'>U<spanclass='operator'>​::​</span><spanclass='texttt'><i>reference-unit</i></span></span> is a valid expression,