<!DOCTYPE html><htmllang='en'><head><title>[qty.sym.expr.general]</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.3</a> Utilities <aclass='abbr_ref'href='qty.utils.html#qty.sym.expr.general'>[qty.utils]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.3.4</a> Symbolic expressions <aclass='abbr_ref'href='qty.sym.expr.html#general'>[qty.sym.expr]</a></h3><h4><aclass='secnum'style='min-width:95pt'>5.3.4.1</a> General <aclass='abbr_ref'>[qty.sym.expr.general]</a></h4><divclass='para'id='1'><divclass='marginalizedparent'><aclass='marginalized'href='#1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-unitse9c5f7236ebfe1b287a5a4a49aaf57fbefa87233/source/quantities.tex#L981'>#</a></div><divclass='texpara'><divid='1.sentence-1'class='sentence'>Subclause <ahref='qty.sym.expr.html'title='5.3.4 Symbolic expressions'>[qty.<spanclass='shy'></span>sym.<spanclass='shy'></span>expr]</a> specifies the components
used to maintain ordered, simplified, and readable
argument lists in the names of specializations<aclass='hidden_link'href='#1.sentence-1'>.</a></div><divid='example-1'class='example'><divclass='texpara'>[<i>Example <ahref='#example-1'>1</a></i>: <spanclass='codeblock'><spanclass='keyword'>using</span><spanclass='keyword'>namespace</span> si<spanclass='operator'>::</span>unit_symbols;
<spanclass='keyword'>int</span> x <spanclass='operator'>=</span> kg <spanclass='operator'>*</span> km <spanclass='operator'>/</span> square<spanclass='parenthesis'>(</span>h<spanclass='parenthesis'>)</span>; <spanclass='comment'>// error: cannot construct from</span>
The library ensures <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>kg <spanclass='operator'>*</span> km <spanclass='operator'>/</span> square<spanclass='parenthesis'>(</span>h<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is styled-like as commented in diagnostics,
provided that, in the implementation-defined total order of types,
<spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>kg<spanclass='parenthesis'>)</span></span> is less than <spanclass='texttt'><spanclass='keyword'>decltype</span><spanclass='parenthesis'>(</span>km<spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#1.sentence-2'>.</a></div> — <i>end example</i>]</div></div></div></div></div></body></html>