Files
mp-units/HEAD/api_reference/gen/qty.pt.orig.ops.html
T

70 lines
26 KiB
HTML

<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig.ops]</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.7</a> Quantity point <a class='abbr_ref' href='qty.pt.html#orig.ops'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.2</a> Point origin <a class='abbr_ref' href='qty.pt.orig.html#ops'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.4</a> Operations <a class='abbr_ref'>[qty.pt.orig.ops]</a></h4><div class='texpara'><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO, <span class='keyword'>typename</span> FwdQ,
<a href='qty.syn.html#concept:QuantityOf' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:QuantityOf'><span class='tcode_in_codeblock'>QuantityOf</span></span></a><span class='anglebracket'>&lt;</span>PO<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span>PO, FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity'><span class='tcode_in_codeblock'>Quantity</span></span></a> FwdQ, <a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin_'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO,
<a href='qty.syn.html#concept:QuantityOf' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:QuantityOf_'><span class='tcode_in_codeblock'>QuantityOf</span></span></a><span class='anglebracket'>&lt;</span>PO<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin__'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO, <a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity_'><span class='tcode_in_codeblock'>Quantity</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.ref.concepts.html#concept:ReferenceOf' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:ReferenceOf'><span class='tcode_in_codeblock'>ReferenceOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, PO<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPoint' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPoint'><span class='tcode_in_codeblock'>QuantityPoint</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span>PO po, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='operator'>-</span>q; <span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin___'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO1, <a class='index' id='conceptref:SameAbsolutePointOriginAs'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span>PO1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity__'><span class='tcode_in_codeblock'>Quantity</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin____'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO1, <a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin_____'><span class='tcode_in_codeblock'>PointOrigin</span></span></a> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='texpara'><div id='lib:quantity,operator+'><div id='lib:operator+,quantity'><div id='lib:point-origin-interface,operator+'><div id='lib:operator+,point-origin-interface'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,point-origin-interface'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin______'><span class='texttt'>PointOrigin</span></span></a> PO, <span class='keyword'>typename</span> FwdQ,
<a href='qty.syn.html#concept:QuantityOf' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:QuantityOf__'><span class='texttt'>QuantityOf</span></span></a><span class='anglebracket'>&lt;</span>PO<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span>PO, FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity___'><span class='texttt'>Quantity</span></span></a> FwdQ, <a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin_______'><span class='texttt'>PointOrigin</span></span></a> PO,
<a href='qty.syn.html#concept:QuantityOf' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:QuantityOf___'><span class='texttt'>QuantityOf</span></span></a><span class='anglebracket'>&lt;</span>PO<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L5584'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> quantity_<span class='shy'></span>point<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>, PO<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator-'><div id='lib:operator-,quantity'><div id='lib:point-origin-interface,operator-'><div id='lib:operator-,point-origin-interface'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,point-origin-interface'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin________'><span class='texttt'>PointOrigin</span></span></a> PO, <a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity____'><span class='texttt'>Quantity</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.ref.concepts.html#concept:ReferenceOf' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:ReferenceOf_'><span class='texttt'>ReferenceOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, PO<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPoint' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPoint_'><span class='texttt'>QuantityPoint</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span>PO po, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='operator'>-</span>q; <span class='curlybracket'>}</span>;
</code></div></div></div></div></div></div><div class='para' id='2'><div class='marginalizedparent'><a class='marginalized' href='#2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L5600'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> po <span class='operator'>+</span> <span class='operator'>-</span>q;</span></div></div></div></div><div class='texpara'><div id='lib:point-origin-interface,operator-_'><div id='lib:operator-,point-origin-interface_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,point-origin-interface_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin_________'><span class='texttt'>PointOrigin</span></span></a> PO1, <a class='index' id='conceptref:SameAbsolutePointOriginAs_'></a><span class='texttt'><i >SameAbsolutePointOriginAs</i></span><span class='anglebracket'>&lt;</span>PO1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='qty.syn.html#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity_____'><span class='texttt'>Quantity</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>;
</code></div></div></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-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L5614'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='keyword'>return</span> po1 <span class='operator'>-</span> po2<span class='operator'>.</span><i >quantity-point</i>;
<span class='curlybracket'>}</span> <span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='keyword'>return</span> po1<span class='operator'>.</span><i >quantity-point</i> <span class='operator'>-</span> po2;
<span class='curlybracket'>}</span> <span class='keyword'>else</span> <span class='curlybracket'>{</span>
<span class='keyword'>return</span> po1<span class='operator'>.</span><i >quantity-point</i> <span class='operator'>-</span> po2<span class='operator'>.</span><i >quantity-point</i>;
<span class='curlybracket'>}</span>
</span></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-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L5627'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Remarks</i>: The expression in the <span class='textsf'><i >requires-clause</i></span> is equivalent to:
<span class='codeblock'><a href='qty.spec.concepts.html#concept:QuantitySpecOf' title='5.4.3.2&emsp;Concepts&emsp;[qty.spec.concepts]'><span id='conceptref:QuantitySpecOf'><span class='tcode_in_codeblock'>QuantitySpecOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>PO1<span class='operator'>::</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span>, PO2<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
</span></div></div></div></div><div class='texpara'><div id='lib:point-origin-interface,operator=='><div id='lib:operator==,point-origin-interface'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,point-origin-interface'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin__________'><span class='texttt'>PointOrigin</span></span></a> PO1, <a href='qty.pt.orig.concepts.html#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOrigin___________'><span class='texttt'>PointOrigin</span></span></a> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='5'><div class='marginalizedparent'><a class='marginalized' href='#5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-unitsf5f502e76f0206565e7dd0453b25e6f87a45a412/source/quantities.tex#L5644'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> std<span class='operator'>::</span>is_same_v<span class='anglebracket'>&lt;</span>PO1, PO2<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span><i >is-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, zeroth_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<i >is-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, zeroth_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
interconvertible<span class='parenthesis'>(</span>po1<span class='operator'>.</span><i >quantity-spec</i>, po2<span class='operator'>.</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> PO1<span class='operator'>::</span><i >quantity-point</i> <span class='operator'>=</span><span class='operator'>=</span> PO2<span class='operator'>::</span><i >quantity-point</i>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO1, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <i >same-absolute-point-origins</i><span class='parenthesis'>(</span>po1, po2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
is_eq_zero<span class='parenthesis'>(</span>PO1<span class='operator'>::</span><i >quantity-point</i><span class='operator'>.</span>quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>PO2, relative_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <i >same-absolute-point-origins</i><span class='parenthesis'>(</span>po1, po2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
is_eq_zero<span class='parenthesis'>(</span>PO2<span class='operator'>::</span><i >quantity-point</i><span class='operator'>.</span>quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div></div></body></html>