Files
mp-units/HEAD/api_reference/gen/qty.val.traits.html
T

12 lines
5.4 KiB
HTML

<!DOCTYPE html><html lang='en'><head><title>[qty.val.traits]</title><meta charset='UTF-8'/><link rel='stylesheet' type='text/css' href='14882.css'/><link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css2?family=Noto+Serif'/><link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css2?family=Noto+Sans'/><link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css2?family=Noto+Sans+Mono'/><link rel='icon' href='icon.png'/><link rel='stylesheet' type='text/css' href='expanded.css' title='Normal'/><link rel='alternate stylesheet' type='text/css' href='colored.css' title='Notes and examples colored'/><link rel='alternate stylesheet' type='text/css' href='normative-only.css' title='Notes and examples hidden'/></head><body><div class='wrapper'><h1 ><a class='secnum' style='min-width:50pt'>5</a> Quantities and units library <a class='abbr_ref' href='index.html#quantities'>[quantities]</a></h1><h2 ><a class='secnum' style='min-width:65pt'>5.5</a> Representation <a class='abbr_ref' href='qty.rep.html#qty.val.traits'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.2</a> Traits <a class='abbr_ref' href='qty.rep.traits.html#qty.val.traits'>[qty.rep.traits]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.2.3</a> Values <a class='abbr_ref'>[qty.val.traits]</a></h4><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units94d7b2bb104446bf4399cd3942b7c74dff32c269/source/quantities.tex#L3758'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>quantity</span> and <span class='texttt'>quantity_<span class='shy'></span>point</span> use <span class='texttt'>representation_<span class='shy'></span>values</span>
to construct special values of its representation type<a class='hidden_link' href='#1.sentence-1'>.</a></div></div><div class='texpara'><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:representation_values'><a class='hidden_link' href='#lib:representation_values' title='5.5.2.3&emsp;Values&emsp;[qty.val.traits]'>representation_values</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration_values<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> Rep one<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div></div><div class='para' id='2'><div class='marginalizedparent'><a class='marginalized' href='#2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units94d7b2bb104446bf4399cd3942b7c74dff32c269/source/quantities.tex#L3773'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>The requirements on <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>chrono<span class='operator'>&#x200b;::&#x200b;</span>duration_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span></span> (<a href="https://wg21.link/time.traits.duration.values">N4971, [time.traits.duration.values]</a>)
also apply to <span class='texttt'>representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>static</span> <span class='keyword'>constexpr</span> Rep one<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div></div><div class='para' id='3'><div class='marginalizedparent'><a class='marginalized' href='#3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units94d7b2bb104446bf4399cd3942b7c74dff32c269/source/quantities.tex#L3782'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>Rep<span class='parenthesis'>(</span><span class='literal'>1</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div></div><div class='para' id='4'><div class='marginalizedparent'><a class='marginalized' href='#4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units94d7b2bb104446bf4399cd3942b7c74dff32c269/source/quantities.tex#L3786'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Remarks</i>: The value returned shall be the neutral element for multiplication (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-01-19">IEC 60050, 102-01-19</a>)<a class='hidden_link' href='#4.sentence-1'>.</a></div></div></div></div></div></body></html>