<!DOCTYPE html><htmllang='en'><head><title>[qty.rep.cpos]</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.5</a> Representation <aclass='abbr_ref'href='qty.rep.html#cpos'>[qty.rep]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.5.3</a> Customization point objects <aclass='abbr_ref'>[qty.rep.cpos]</a></h3><divid='general'class='section'><h4><aclass='secnum'href='#general'style='min-width:95pt'>5.5.3.1</a> General <aclass='abbr_ref'href='qty.rep.cpos.general.html'>[qty.rep.cpos.general]</a></h4><divclass='para'id='general-1'><divclass='marginalizedparent'><aclass='marginalized'href='#general-1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3795'>#</a></div><divclass='texpara'><divid='general-1.sentence-1'class='sentence'>Within subclause [qty.<spanclass='shy'></span>rep.<spanclass='shy'></span>cpos],
<aclass='hidden_link'href='#def:reified_object'id='def:reified_object'><i>reified object</i></a> is as defined in <ahref="https://wg21.link/range.access.general">N4971, [range.access.general]</a><aclass='hidden_link'href='#general-1.sentence-1'>.</a></div></div></div></div><divid='qty.real.cpo'class='section'><h4><aclass='secnum'href='#qty.real.cpo'style='min-width:95pt'>5.5.3.2</a><spanclass='texttt'>mp_<spanclass='shy'></span>units​::​real</span><aclass='abbr_ref'href='qty.real.cpo.html'>[qty.real.cpo]</a></h4><divclass='para'id='qty.real.cpo-1'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.real.cpo-1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3801'>#</a></div><divclass='texpara'><divid='qty.real.cpo-1.sentence-1'class='sentence'>The name <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>real</span> denotes a customization point object (<ahref="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<aclass='hidden_link'href='#qty.real.cpo-1.sentence-1'>.</a></div></div></div><divclass='para'id='qty.real.cpo-2'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.real.cpo-2'>2</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3804'>#</a></div><divclass='texpara'><divid='qty.real.cpo-2.sentence-1'class='sentence'>Given a subexpression <spanclass='texttt'>E</span> with type <spanclass='texttt'>T</span>,
let <spanclass='texttt'>t</span> be an lvalue that denotes the reified object for <spanclass='texttt'>E</span><aclass='hidden_link'href='#qty.real.cpo-2.sentence-1'>.</a></div><divid='qty.real.cpo-2.sentence-2'class='sentence'>Then:
<ulclass='itemize'><liid='qty.real.cpo-2.1'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.real.cpo-2.1'>(2.1)</a></div><divclass='texpara'><divid='qty.real.cpo-2.1.sentence-1'class='sentence'>If <spanclass='texttt'>T</span> does not model <ahref='qty.rep.concepts.html#concept:WeaklyRegular'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:WeaklyRegular'><spanclass='texttt'><i>WeaklyRegular</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>real<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.real.cpo-2.1.sentence-1'>.</a></div></div></li><liid='qty.real.cpo-2.2'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.real.cpo-2.2'>(2.2)</a></div><divclass='texpara'><divid='qty.real.cpo-2.2.sentence-1'class='sentence'>If <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>real<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>real<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>real<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.real.cpo-2.2.sentence-1'>.</a></div></div></li><liid='qty.real.cpo-2.3'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.real.cpo-2.3'>(2.3)</a></div><divclass='texpara'><divid='qty.real.cpo-2.3.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>real<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar_'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>real</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>real<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.real.cpo-2.3.sentence-1'>.</a></div></div></li><liid='qty.real.cpo-2.4'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.real.cpo-2.4'>(2.4)</a></div><divclass='texpara'><divid='qty.real.cpo-2.4.sentence-1'class='sentence'>Otherwise, <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>real<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.real.cpo-2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div><divid='qty.imag.cpo'class='section'><h4><aclass='secnum'href='#qty.imag.cpo'style='min-width:95pt'>5.5.3.3</a><spanclass='texttt'>mp_<spanclass='shy'></span>units​::​imag</span><aclass='abbr_ref'href='qty.imag.cpo.html'>[qty.imag.cpo]</a></h4><divclass='para'id='qty.imag.cpo-1'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.imag.cpo-1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3826'>#</a></div><divclass='texpara'><divid='qty.imag.cpo-1.sentence-1'class='sentence'>The name <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>imag</span> denotes a customization point object (<ahref="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<aclass='hidden_link'href='#qty.imag.cpo-1.sentence-1'>.</a></div></div></div><divclass='para'id='qty.imag.cpo-2'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.imag.cpo-2'>2</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3829'>#</a></div><divclass='texpara'><divid='qty.imag.cpo-2.sentence-1'class='sentence'>Given a subexpression <spanclass='texttt'>E</span> with type <spanclass='texttt'>T</span>,
let <spanclass='texttt'>t</span> be an lvalue that denotes the reified object for <spanclass='texttt'>E</span><aclass='hidden_link'href='#qty.imag.cpo-2.sentence-1'>.</a></div><divid='qty.imag.cpo-2.sentence-2'class='sentence'>Then:
<ulclass='itemize'><liid='qty.imag.cpo-2.1'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.imag.cpo-2.1'>(2.1)</a></div><divclass='texpara'><divid='qty.imag.cpo-2.1.sentence-1'class='sentence'>If <spanclass='texttt'>T</span> does not model <ahref='qty.rep.concepts.html#concept:WeaklyRegular'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:WeaklyRegular_'><spanclass='texttt'><i>WeaklyRegular</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>imag<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.imag.cpo-2.1.sentence-1'>.</a></div></div></li><liid='qty.imag.cpo-2.2'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.imag.cpo-2.2'>(2.2)</a></div><divclass='texpara'><divid='qty.imag.cpo-2.2.sentence-1'class='sentence'>If <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>imag<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar__'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>imag<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>imag<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.imag.cpo-2.2.sentence-1'>.</a></div></div></li><liid='qty.imag.cpo-2.3'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.imag.cpo-2.3'>(2.3)</a></div><divclass='texpara'><divid='qty.imag.cpo-2.3.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>imag<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar___'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>imag</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>imag<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.imag.cpo-2.3.sentence-1'>.</a></div></div></li><liid='qty.imag.cpo-2.4'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.imag.cpo-2.4'>(2.4)</a></div><divclass='texpara'><divid='qty.imag.cpo-2.4.sentence-1'class='sentence'>Otherwise, <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>imag<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.imag.cpo-2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div><divid='qty.modulus.cpo'class='section'><h4><aclass='secnum'href='#qty.modulus.cpo'style='min-width:95pt'>5.5.3.4</a><spanclass='texttt'>mp_<spanclass='shy'></span>units​::​modulus</span><aclass='abbr_ref'href='qty.modulus.cpo.html'>[qty.modulus.cpo]</a></h4><divclass='para'id='qty.modulus.cpo-1'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.modulus.cpo-1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3851'>#</a></div><divclass='texpara'><divid='qty.modulus.cpo-1.sentence-1'class='sentence'>The name <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus</span> denotes a customization point object (<ahref="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<aclass='hidden_link'href='#qty.modulus.cpo-1.sentence-1'>.</a></div></div></div><divclass='para'id='qty.modulus.cpo-2'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.modulus.cpo-2'>2</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3854'>#</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.sentence-1'class='sentence'>Given a subexpression <spanclass='texttt'>E</span> with type <spanclass='texttt'>T</span>,
let <spanclass='texttt'>t</span> be an lvalue that denotes the reified object for <spanclass='texttt'>E</span><aclass='hidden_link'href='#qty.modulus.cpo-2.sentence-1'>.</a></div><divid='qty.modulus.cpo-2.sentence-2'class='sentence'>Then:
<ulclass='itemize'><liid='qty.modulus.cpo-2.1'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.1'>(2.1)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.1.sentence-1'class='sentence'>If <spanclass='texttt'>T</span> does not model <ahref='qty.rep.concepts.html#concept:WeaklyRegular'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:WeaklyRegular__'><spanclass='texttt'><i>WeaklyRegular</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.modulus.cpo-2.1.sentence-1'>.</a></div></div></li><liid='qty.modulus.cpo-2.2'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.2'>(2.2)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.2.sentence-1'class='sentence'>If <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>modulus<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar____'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>modulus<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.modulus.cpo-2.2.sentence-1'>.</a></div></div></li><liid='qty.modulus.cpo-2.3'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.3'>(2.3)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.3.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>modulus<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar_____'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>modulus</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.modulus.cpo-2.3.sentence-1'>.</a></div></div></li><liid='qty.modulus.cpo-2.4'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.4'>(2.4)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.4.sentence-1'class='sentence'>If <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>abs<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar______'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>abs<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.modulus.cpo-2.4.sentence-1'>.</a></div></div></li><liid='qty.modulus.cpo-2.5'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.5'>(2.5)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.5.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>abs<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar_______'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>abs</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.modulus.cpo-2.5.sentence-1'>.</a></div></div></li><liid='qty.modulus.cpo-2.6'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.modulus.cpo-2.6'>(2.6)</a></div><divclass='texpara'><divid='qty.modulus.cpo-2.6.sentence-1'class='sentence'>Otherwise, <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>modulus<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.modulus.cpo-2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div><divid='qty.mag.cpo'class='section'><h4><aclass='secnum'href='#qty.mag.cpo'style='min-width:95pt'>5.5.3.5</a><spanclass='texttt'>mp_<spanclass='shy'></span>units​::​magnitude</span><aclass='abbr_ref'href='qty.mag.cpo.html'>[qty.mag.cpo]</a></h4><divclass='para'id='qty.mag.cpo-1'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.mag.cpo-1'>1</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3884'>#</a></div><divclass='texpara'><divid='qty.mag.cpo-1.sentence-1'class='sentence'>The name <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude</span> denotes a customization point object (<ahref="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<aclass='hidden_link'href='#qty.mag.cpo-1.sentence-1'>.</a></div></div></div><divclass='para'id='qty.mag.cpo-2'><divclass='marginalizedparent'><aclass='marginalized'href='#qty.mag.cpo-2'>2</a></div><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3887'>#</a></div><divclass='texpara'><divid='qty.mag.cpo-2.sentence-1'class='sentence'>Given a subexpression <spanclass='texttt'>E</span> with type <spanclass='texttt'>T</span>,
let <spanclass='texttt'>t</span> be an lvalue that denotes the reified object for <spanclass='texttt'>E</span><aclass='hidden_link'href='#qty.mag.cpo-2.sentence-1'>.</a></div><divid='qty.mag.cpo-2.sentence-2'class='sentence'>Then:
<ulclass='itemize'><liid='qty.mag.cpo-2.1'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.1'>(2.1)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.1.sentence-1'class='sentence'>If <spanclass='texttt'>T</span> does not model <ahref='qty.rep.concepts.html#concept:WeaklyRegular'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:WeaklyRegular___'><spanclass='texttt'><i>WeaklyRegular</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.mag.cpo-2.1.sentence-1'>.</a></div></div></li><liid='qty.mag.cpo-2.2'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.2'>(2.2)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.2.sentence-1'class='sentence'>If <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>magnitude<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar________'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>magnitude<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.mag.cpo-2.2.sentence-1'>.</a></div></div></li><liid='qty.mag.cpo-2.3'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.3'>(2.3)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.3.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>magnitude<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar_________'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.mag.cpo-2.3.sentence-1'>.</a></div></div></li><liid='qty.mag.cpo-2.4'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.4'>(2.4)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.4.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>abs<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar__________'><spanclass='texttt'><i>Scalar</i></span></span></a>,
<spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>​E<spanclass='parenthesis'>)</span></span> is expression-equivalent to <spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>t<spanclass='operator'>.</span>abs<spanclass='parenthesis'>(</span><spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span><aclass='hidden_link'href='#qty.mag.cpo-2.4.sentence-1'>.</a></div></div></li><liid='qty.mag.cpo-2.5'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.5'>(2.5)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.5.sentence-1'class='sentence'>Otherwise, if <spanclass='texttt'>T</span> is a class or enumeration type and
<spanclass='texttt'><spanclass='keyword'>auto</span><spanclass='parenthesis'>(</span>abs<spanclass='parenthesis'>(</span>t<spanclass='parenthesis'>)</span><spanclass='parenthesis'>)</span></span> is a valid expression whose type models <ahref='qty.rep.concepts.html#concept:Scalar'title='5.5.4 Concepts [qty.rep.concepts]'><spanid='conceptref:Scalar___________'><spanclass='texttt'><i>Scalar</i></span></span></a>
where the meaning of <spanclass='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<ahref="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is expression-equivalent to that expression<aclass='hidden_link'href='#qty.mag.cpo-2.5.sentence-1'>.</a></div></div></li><liid='qty.mag.cpo-2.6'><divclass='marginalizedparent'style='left:-27mm'><aclass='marginalized'href='#qty.mag.cpo-2.6'>(2.6)</a></div><divclass='texpara'><divid='qty.mag.cpo-2.6.sentence-1'class='sentence'>Otherwise, <spanclass='texttt'>mp_<spanclass='shy'></span>units<spanclass='operator'>​::​</span>magnitude<spanclass='parenthesis'>(</span>E<spanclass='parenthesis'>)</span></span> is ill-formed<aclass='hidden_link'href='#qty.mag.cpo-2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div></div></body></html>