Files
mp-units/HEAD/api_reference/gen/kind.of.qty.html
T

11 lines
4.2 KiB
HTML

<!DOCTYPE html><html lang='en'><head><title>[kind.of.qty]</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.4</a> Reference <a class='abbr_ref' href='qty.ref.html#kind.of.qty'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.3</a> Quantity specification <a class='abbr_ref' href='qty.spec.html#kind.of.qty'>[qty.spec]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.3.3</a> Types <a class='abbr_ref' href='qty.spec.types.html#kind.of.qty'>[qty.spec.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.3.4</a> Kind of <a class='abbr_ref'>[kind.of.qty]</a></h4><div class='texpara'><span id='lib:kind_of_'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:kind_of_'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.spec.concepts.html#concept:QuantitySpec' title='5.4.3.2&emsp;Concepts&emsp;[qty.spec.concepts]'><span id='conceptref:QuantitySpec'><span class='tcode_in_codeblock'>QuantitySpec</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='keyword'>struct</span> kind_of_ <span class='keyword'>final</span> <span class='operator'>:</span> Q<span class='operator'>::</span><i >base-type</i> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> <i >base-type</i> <span class='operator'>=</span> kind_of_; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><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-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L1832'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>kind_<span class='shy'></span>of<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span></span> represents a kind of quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-04">IEC 60050, 112-01-04</a>) <span class='texttt'>Q</span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>