Deployed 91791210 to HEAD with MkDocs 1.6.1 and mike 2.1.3

This commit is contained in:
github-actions
2025-06-16 16:22:40 +00:00
parent 84d97e2371
commit a24f8d8833
239 changed files with 3432 additions and 16955 deletions

View File

@ -19,7 +19,7 @@
<link rel="alternate" type="application/rss+xml" title="RSS feed of updated content" href="/mp-units/HEAD/feed_rss_updated.xml">
<link rel="icon" href="/mp-units/HEAD/assets/images/mp-units-color.svg">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.11">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.14">
@ -27,7 +27,7 @@
<link rel="stylesheet" href="/mp-units/HEAD/assets/stylesheets/main.4af4bdda.min.css">
<link rel="stylesheet" href="/mp-units/HEAD/assets/stylesheets/main.342714a4.min.css">
<link rel="stylesheet" href="/mp-units/HEAD/assets/stylesheets/palette.06af60db.min.css">
@ -2338,10 +2338,10 @@ You're not viewing the latest version.
<script id="__config" type="application/json">{"base": "/mp-units/HEAD", "features": ["content.action.edit", "content.action.view", "content.code.annotate", "content.code.copy", "navigation.indexes", "navigation.tabs", "navigation.footer", "navigation.top", "search.highlight", "search.share", "search.suggest", "toc.follow", "toc.integrate"], "search": "/mp-units/HEAD/assets/javascripts/workers/search.f8cc74c7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
<script id="__config" type="application/json">{"base": "/mp-units/HEAD", "features": ["content.action.edit", "content.action.view", "content.code.annotate", "content.code.copy", "navigation.indexes", "navigation.tabs", "navigation.footer", "navigation.top", "search.highlight", "search.share", "search.suggest", "toc.follow", "toc.integrate"], "search": "/mp-units/HEAD/assets/javascripts/workers/search.d50fe291.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
<script src="/mp-units/HEAD/assets/javascripts/bundle.c8b220af.min.js"></script>
<script src="/mp-units/HEAD/assets/javascripts/bundle.13a4f30d.min.js"></script>
<script src="/mp-units/HEAD/javascripts/mathjax.js"></script>

View File

@ -1,758 +0,0 @@
body {
font-family: 'Noto Serif';
hyphens: auto;
line-height: 1.5;
margin-left: 20mm;
margin-right: 16mm;
margin-top: 12mm;
margin-bottom: 12mm;
font-size: 10pt;
}
div {
background: inherit;
}
div.wrapper {
max-width: 20cm;
margin: auto;
}
div.texpara {
margin-top: 3pt;
margin-bottom: 3pt;
}
table div.texpara {
margin-top: 0;
margin-bottom: 0;
}
table.enumerate div.texpara {
margin-top: 3pt;
margin-bottom: 3pt;
}
ul {
list-style-type: none;
padding-left: 9mm;
margin-top: 0;
margin-bottom: 0;
}
ol {
margin-top: 0;
margin-bottom: 0;
}
a { text-decoration: none; }
a.hidden_link {
text-decoration: none;
color: inherit;
}
li {
margin-top: 3pt;
margin-bottom: 3pt;
}
h1 {
line-height: 1;
margin-top: 10pt;
margin-bottom: 10pt;
}
h2 {
line-height: 1;
font-size: 14pt;
margin-top: 10pt;
margin-bottom: 10pt;
}
h2::after {
content: "";
clear: both;
display: table;
}
h3 {
line-height: 1;
margin-top: 10pt;
margin-bottom: 10pt;
}
h3::after {
content: "";
clear: both;
display: table;
}
h4 {
line-height: 1;
margin-top: 10pt;
margin-bottom: 10pt;
}
h4::after {
content: "";
clear: both;
display: table;
}
ul > li:before {
content: "\2014";
position: absolute;
margin-left: -1.5em;
}
.shy:before {
content: "\00ad";
/* This is U+00AD SOFT HYPHEN, same as &shy, but we put it in :before
to stop it from being included when the text is copied to the clipboard
with Firefox, which is especially annoying when copying to a terminal,
where the hyphen characters will show up. */
}
:target { background-color: #C9FBC9; }
:target .codeblock { background-color: #C9FBC9; }
:target ul { background-color: #C9FBC9; }
.abbr_ref { float: right; }
.folded_abbr_ref { float: right; }
:target .folded_abbr_ref { display: none; }
:target .unfolded_abbr_ref { float: right; display: inherit; }
.unfolded_abbr_ref { display: none; }
.secnum { display: inline-block; min-width: 35pt; }
.annexnum { display: block; }
div.sourceLinkParent {
float: right;
}
a.sourceLink {
position: absolute;
opacity: 0;
margin-left: 10pt;
}
a.sourceLink:hover {
opacity: 1;
}
a.itemDeclLink {
position: absolute;
font-size: 75%;
text-align: right;
width: 5em;
opacity: 0;
}
a.itemDeclLink:hover { opacity: 1; }
div.marginalizedparent {
position: relative;
left: -18mm;
}
a.marginalized {
width: 15mm;
position: absolute;
font-size: 7pt;
text-align: right;
}
a.enumerated_item_num {
display: block;
margin-top: 3pt;
margin-bottom: 3pt;
margin-right: 6pt;
}
div.para {
margin-bottom: 6pt;
margin-top: 6pt;
text-align: justify;
min-height: 1.2em;
}
div.section { text-align: justify; }
div.sentence { display: inline; }
a.index {
position: relative;
float: right;
right: -1em;
display: none;
}
a.index:before {
position: absolute;
content: "⟵";
background-color: #C9FBC9;
}
a.index:target {
display: inline;
}
.indexitems {
margin-left: 2em;
text-indent: -2em;
}
div.itemdescr {
margin-left: 12mm;
}
.bnf {
font-family: 'Noto Sans';
font-size: 10pt;
font-style: italic;
margin-left: 25pt;
margin-right: -15mm;
margin-top: 0.5em;
margin-bottom: 0.5em;
text-indent: -3em;
padding-left: 3em;
line-height: 1.5;
}
div.bnf span.texttt { font-family: 'Noto Sans Mono'; font-style: normal; }
.rebnf {
font-family: 'Noto Serif';
font-style: italic;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 30pt;
text-indent: -3em;
padding-left: 3em;
line-height: 1.5;
}
.simplebnf {
font-family: 'Noto Serif';
font-style: italic;
font-size: 10pt;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 30pt;
line-height: 1.5;
}
span.textnormal {
font-style: normal;
font-family: 'Noto Serif';
font-size: 10pt;
white-space: normal;
}
.bnf span.textnormal {
font-style: normal;
font-family: 'Noto Serif';
font-size: 10pt;
white-space: normal;
}
p {
margin-top: 4pt;
margin-bottom: 4pt;
}
span.rlap {
display: inline-block;
width: 0px;
text-indent: 0;
}
span.terminal {
font-family: 'Noto Sans Mono';
font-style: normal;
font-size: 9pt;
white-space: pre-wrap;
}
span.noncxxterminal {
font-family: 'Noto Sans Mono';
font-style: normal;
font-size: 9pt;
}
span.term { font-style: italic; }
span.tcode { font-family: 'Noto Sans Mono'; font-style: normal; }
span.textbf { font-weight: bold; }
span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
div.footnote span.textsf { font-family: 'Noto Sans'; font-size: 8pt; }
.bnf span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
.simplebnf span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
.example span.textsf { font-family: 'Noto Sans'; font-size: 10pt; }
span.textsc { font-variant: small-caps; }
span.nontermdef { font-style: italic; font-family: 'Noto Sans'; font-size: 10pt; }
.rebnf a.nontermdef { font-style: italic; font-family: 'Noto Serif'; }
span.emph { font-style: italic; }
span.techterm { font-style: italic; }
span.mathit { font-style: italic; }
span.mathsf { font-family: 'Noto Sans'; }
span.mathrm { font-family: 'Noto Serif'; font-style: normal; }
span.textrm { font-family: 'Noto Serif'; font-size: 10pt; }
span.textsl { font-style: italic; }
span.mathtt { font-family: 'Noto Sans Mono'; font-style: normal; }
span.mbox { font-family: 'Noto Serif'; font-style: normal; }
span.ungap { display: inline-block; width: 2pt; }
span.texttt { font-family: 'Noto Sans Mono'; }
div.footnote span.texttt { font-family: 'Noto Sans Mono'; }
span.tcode_in_codeblock { font-family: 'Noto Sans Mono'; font-style: normal; font-size: 9pt; }
span.phantom { color: white; }
/* Unfortunately, this way the text is still selectable. Another
option is display:none, but then we lose the nice layout.
Todo: find proper solution. */
span.math {
font-style: normal;
font-family: 'Noto Serif';
font-size: 10pt;
}
span.mathblock {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 1.2em;
margin-bottom: 1.2em;
text-align: center;
}
span.mathalpha {
font-style: italic;
}
span.synopsis {
font-weight: bold;
margin-top: 0.5em;
display: block;
}
span.definition {
font-weight: bold;
display: block;
}
.codeblock {
font-family: 'Noto Sans Mono';
margin-left: 1.2em;
line-height: 1.5;
font-size: 9pt;
white-space: pre;
display: block;
margin-top: 3pt;
margin-bottom: 3pt;
overflow: auto;
margin-right: -15mm;
}
table .codeblock { margin-right: 0; }
.outputblock {
margin-left: 1.2em;
line-height: 1.5;
font-family: 'Noto Sans Mono';
font-size: 9pt;
}
code {
font-family: 'Noto Sans Mono';
font-style: normal;
}
div.itemdecl {
margin-top: 2ex;
}
code.itemdeclcode {
white-space: pre;
font-family: 'Noto Sans Mono';
font-size: 9pt;
display: block;
overflow: auto;
margin-right: -15mm;
}
.comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 10pt; }
.footnote .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 8pt; }
.example .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 9pt; }
.note .comment { color: green; font-style: italic; font-family: 'Noto Serif'; font-size: 9pt; }
span.keyword { color: #00607c; font-style: normal; }
span.parenthesis { color: #af1915; }
span.curlybracket { color: #af1915; }
span.squarebracket { color: #af1915; }
span.literal { color: #9F6807; }
span.literalterminal { color: #9F6807; font-family: 'Noto Sans Mono'; font-style: normal; }
span.operator { color: #570057; }
span.anglebracket { color: #570057; }
span.preprocessordirective { color: #6F4E37; }
span.textsuperscript {
vertical-align: super;
font-size: smaller;
line-height: 0;
}
.footnoteref {
vertical-align: super;
font-size: smaller;
line-height: 0;
}
.footnote {
font-size: 8pt;
}
.footnote .math {
font-size: 8pt;
}
.footnotenum {
display: inline-block;
text-align: right;
margin-right: 1mm;
width: 4ch;
}
.footnoteBacklink {
display: none;
}
:target .footnoteBacklink {
display: inline-block;
text-align: right;
margin-right: 1mm;
width: 4ch;
}
:target .footnotenum {
display: none;
}
.footnoteSeparator {
background: black;
margin-top: 5mm;
height: 1px;
width: 6cm;
}
div.minipage {
display: inline-block;
margin-right: 3em;
}
div.numberedTable {
text-align: center;
margin-left: 1em;
margin-right: 1em;
margin-bottom: 12pt;
margin-top: 8pt;
}
div.figure {
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 12pt;
margin-top: 3pt;
}
table {
border: 1px solid black;
border-collapse: collapse;
margin-left: auto;
margin-right: auto;
margin-top: 7pt;
text-align: left;
}
td, th {
padding-left: 8pt;
padding-right: 8pt;
vertical-align: top;
}
td.empty {
padding: 0px;
padding-left: 1px;
}
td.left {
text-align: left;
}
td.hidden {
padding: 0;
width: 0;
}
td.right {
text-align: right;
}
td.center {
text-align: center;
}
td.justify {
text-align: justify;
}
td.border {
border-left: 1px solid black;
}
tr.rowsep, td.cline {
border-top: 1px solid black;
}
tr.capsep {
border-top: 3px solid black;
border-top-style: double;
}
th {
border-bottom: 1px solid black;
}
span.centry {
font-weight: bold;
}
div.table {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
width: 90%;
}
span.indented {
background: inherit;
display: block;
margin-left: 2em;
margin-bottom: 1em;
margin-top: 1em;
}
span.uppercase {
text-transform: uppercase;
}
span.ucode {
font-variant: small-caps;
text-transform: uppercase;
font-size: 90%;
}
span.uname {
font-variant: small-caps;
text-transform: uppercase;
font-size: 90%;
}
table.enumerate {
border: 0;
margin: 0;
}
table.enumerate td {
padding: 0;
}
table.enumerate td:first-child {
width: 1cm;
text-align: right;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #171717;
color: #b0b0b0;
}
span.mjx-mstyle { color: #b0b0b0 !important }
a:link { color: #549df2; }
a:visited { color: #a36ae6; }
a.hidden_link {
text-decoration: none;
color: inherit;
}
span.phantom { color: #171717; }
:target { background-color: #3b4343; }
:target .codeblock { background-color: #3b4343; }
:target ul { background-color: #3b4343; }
a.index:before { color: #b0b0b0; background-color: #3b4343; }
.comment { color: #35ba00; }
.footnote .comment { color: #35ba00; }
.example .comment { color: #35ba00; }
.note .comment { color: #35ba00; }
span.keyword { color: #12cabe; }
span.parenthesis { color: #cf1915; }
span.curlybracket { color: #cf1915; }
span.squarebracket { color: #cf1915; }
span.literal { color: #bF8827; }
span.literalterminal { color: #bF8827; }
span.operator { color: #baa6b9; }
span.anglebracket { color: #baa6b9; }
span.preprocessordirective { color: #b27c58; }
table { border-color: #b0b0b0; }
td.border { border-color: #b0b0b0; }
td.border { border-left-color: #b0b0b0; }
tr.rowsep, td.cline { border-top-color: #b0b0b0; }
tr.capsep { border-top-color: #b0b0b0; }
th { border-bottom-color: #b0b0b0; }
.footnoteSeparator { background-color: #b0b0b0; }
text { fill: #b0b0b0; }
path { stroke: #b0b0b0; }
polygon { stroke: #b0b0b0; fill: #b0b0b0; }
ellipse { stroke: #b0b0b0; }
}
.mjx-chtml {display: inline-block; line-height: 0; text-indent: 0; text-align: left; text-transform: none; font-style: normal; font-weight: normal; font-size: 100%; font-size-adjust: none; letter-spacing: normal; word-wrap: normal; word-spacing: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0; min-height: 0; border: 0; margin: 0; padding: 1px 0}
.MJXc-display {display: block;background:inherit; text-align: center; margin: 1em 0; padding: 0}
.mjx-chtml[tabindex]:focus, body :focus .mjx-chtml[tabindex] {display: inline-table}
.mjx-full-width {text-align: center; display: table-cell!important; width: 10000em}
.mjx-math {display: inline-block; border-collapse: separate; border-spacing: 0}
.mjx-math * {display: inline-block; -webkit-box-sizing: content-box!important; -moz-box-sizing: content-box!important; box-sizing: content-box!important; text-align: left}
.mjx-numerator {display: block;background:inherit; text-align: center}
.mjx-denominator {display: block;background:inherit; text-align: center}
.MJXc-stacked {height: 0; position: relative}
.MJXc-stacked > * {position: absolute}
.MJXc-bevelled > * {display: inline-block}
.mjx-stack {display: inline-block}
.mjx-op {display: block;background:inherit}
.mjx-under {display: table-cell}
.mjx-over {display: block;background:inherit}
.mjx-over > * {padding-left: 0px!important; padding-right: 0px!important}
.mjx-under > * {padding-left: 0px!important; padding-right: 0px!important}
.mjx-stack > .mjx-sup {display: block;background:inherit}
.mjx-stack > .mjx-sub {display: block;background:inherit}
.mjx-prestack > .mjx-presup {display: block;background:inherit}
.mjx-prestack > .mjx-presub {display: block;background:inherit}
.mjx-delim-h > .mjx-char {display: inline-block}
.mjx-surd {vertical-align: top}
.mjx-surd + .mjx-box {display: inline-flex}
.mjx-mphantom * {visibility: hidden}
.mjx-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 2px 3px; font-style: normal; font-size: 90%}
.mjx-annotation-xml {line-height: normal}
.mjx-menclose > svg {fill: none; stroke: currentColor; overflow: visible}
.mjx-mtr {display: table-row}
.mjx-mlabeledtr {display: table-row}
.mjx-mtd {display: table-cell; text-align: center}
.mjx-label {display: table-row}
.mjx-box {display: inline-block}
.mjx-block {display: block;background:inherit}
.mjx-span {display: inline}
.mjx-char {display: block;background:inherit; white-space: pre}
.mjx-itable {display: inline-table; width: auto}
.mjx-row {display: table-row}
.mjx-cell {display: table-cell}
.mjx-table {display: table; width: 100%}
.mjx-line {display: block;background:inherit; height: 0}
.mjx-strut {width: 0; padding-top: 1em}
.mjx-vsize {width: 0}
.MJXc-space1 {margin-left: .167em}
.MJXc-space2 {margin-left: .222em}
.MJXc-space3 {margin-left: .278em}
.mjx-test.mjx-test-display {display: table!important}
.mjx-test.mjx-test-inline {display: inline!important; margin-right: -1px}
.mjx-test.mjx-test-default {display: block;background:inherit!important; clear: both}
.mjx-ex-box {display: inline-block!important; position: absolute; overflow: hidden; min-height: 0; max-height: none; padding: 0; border: 0; margin: 0; width: 1px; height: 60ex}
.mjx-test-inline .mjx-left-box {display: inline-block; width: 0; float: left}
.mjx-test-inline .mjx-right-box {display: inline-block; width: 0; float: right}
.mjx-test-display .mjx-right-box {display: table-cell!important; width: 10000em!important; min-width: 0; max-width: none; padding: 0; border: 0; margin: 0}
.MJXc-TeX-unknown-R {font-family: monospace; font-style: normal; font-weight: normal}
.MJXc-TeX-unknown-I {font-family: monospace; font-style: italic; font-weight: normal}
.MJXc-TeX-unknown-B {font-family: monospace; font-style: normal; font-weight: bold}
.MJXc-TeX-unknown-BI {font-family: monospace; font-style: italic; font-weight: bold}
.MJXc-TeX-ams-R {font-family: MJXc-TeX-ams-R,MJXc-TeX-ams-Rw}
.MJXc-TeX-cal-B {font-family: MJXc-TeX-cal-B,MJXc-TeX-cal-Bx,MJXc-TeX-cal-Bw}
.MJXc-TeX-frak-R {font-family: MJXc-TeX-frak-R,MJXc-TeX-frak-Rw}
.MJXc-TeX-frak-B {font-family: MJXc-TeX-frak-B,MJXc-TeX-frak-Bx,MJXc-TeX-frak-Bw}
.MJXc-TeX-math-BI {font-family: MJXc-TeX-math-BI,MJXc-TeX-math-BIx,MJXc-TeX-math-BIw}
.MJXc-TeX-sans-R {font-family: 'Noto Sans'; font-size: 10pt; }
.MJXc-TeX-sans-B {font-family: MJXc-TeX-sans-B,MJXc-TeX-sans-Bx,MJXc-TeX-sans-Bw}
.MJXc-TeX-sans-I {font-family: MJXc-TeX-sans-I,MJXc-TeX-sans-Ix,MJXc-TeX-sans-Iw}
.MJXc-TeX-script-R {font-family: MJXc-TeX-script-R,MJXc-TeX-script-Rw}
.MJXc-TeX-type-R {font-family: 'Noto Sans Mono'; font-size: 10pt; }
.MJXc-TeX-cal-R {font-family: MJXc-TeX-cal-R,MJXc-TeX-cal-Rw}
.MJXc-TeX-main-B {font-family: MJXc-TeX-main-B,MJXc-TeX-main-Bx,MJXc-TeX-main-Bw}
.MJXc-TeX-main-I {font-style: italic}
.MJXc-TeX-main-R {}
.MJXc-TeX-math-I {font-style: italic}
.MJXc-TeX-size1-R {font-family: MJXc-TeX-size1-R,MJXc-TeX-size1-Rw}
.MJXc-TeX-size2-R {font-family: MJXc-TeX-size2-R,MJXc-TeX-size2-Rw}
.MJXc-TeX-size3-R {font-family: MJXc-TeX-size3-R,MJXc-TeX-size3-Rw}
.MJXc-TeX-size4-R {font-family: MJXc-TeX-size4-R,MJXc-TeX-size4-Rw}
.MJXc-TeX-vec-R {font-family: MJXc-TeX-vec-R,MJXc-TeX-vec-Rw}
.MJXc-TeX-vec-B {font-family: MJXc-TeX-vec-B,MJXc-TeX-vec-Bx,MJXc-TeX-vec-Bw}
@font-face {font-family: MJXc-TeX-ams-R; src: local('MathJax_AMS'), local('MathJax_AMS-Regular')}
@font-face {font-family: MJXc-TeX-ams-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-cal-B; src: local('MathJax_Caligraphic Bold'), local('MathJax_Caligraphic-Bold')}
@font-face {font-family: MJXc-TeX-cal-Bx; src: local('MathJax_Caligraphic'); font-weight: bold}
@font-face {font-family: MJXc-TeX-cal-Bw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-frak-R; src: local('MathJax_Fraktur'), local('MathJax_Fraktur-Regular')}
@font-face {font-family: MJXc-TeX-frak-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-frak-B; src: local('MathJax_Fraktur Bold'), local('MathJax_Fraktur-Bold')}
@font-face {font-family: MJXc-TeX-frak-Bx; src: local('MathJax_Fraktur'); font-weight: bold}
@font-face {font-family: MJXc-TeX-frak-Bw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-math-BI; src: local('MathJax_Math BoldItalic'), local('MathJax_Math-BoldItalic')}
@font-face {font-family: MJXc-TeX-math-BIx; src: local('MathJax_Math'); font-weight: bold; font-style: italic}
@font-face {font-family: MJXc-TeX-math-BIw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-sans-R; src: local('MathJax_SansSerif'), local('MathJax_SansSerif-Regular')}
@font-face {font-family: MJXc-TeX-sans-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-sans-B; src: local('MathJax_SansSerif Bold'), local('MathJax_SansSerif-Bold')}
@font-face {font-family: MJXc-TeX-sans-Bx; src: local('MathJax_SansSerif'); font-weight: bold}
@font-face {font-family: MJXc-TeX-sans-Bw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-sans-I; src: local('MathJax_SansSerif Italic'), local('MathJax_SansSerif-Italic')}
@font-face {font-family: MJXc-TeX-sans-Ix; src: local('MathJax_SansSerif'); font-style: italic}
@font-face {font-family: MJXc-TeX-sans-Iw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-script-R; src: local('MathJax_Script'), local('MathJax_Script-Regular')}
@font-face {font-family: MJXc-TeX-script-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-type-R; src: local('MathJax_Typewriter'), local('MathJax_Typewriter-Regular')}
@font-face {font-family: MJXc-TeX-type-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-cal-R; src: local('MathJax_Caligraphic'), local('MathJax_Caligraphic-Regular')}
@font-face {font-family: MJXc-TeX-cal-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-main-B; src: local('MathJax_Main Bold'), local('MathJax_Main-Bold')}
@font-face {font-family: MJXc-TeX-main-Bx; src: local('MathJax_Main'); font-weight: bold}
@font-face {font-family: MJXc-TeX-main-Bw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-main-I; src: local('MathJax_Main Italic'), local('MathJax_Main-Italic')}
@font-face {font-family: MJXc-TeX-main-Ix; src: local('MathJax_Main'); font-style: italic}
@font-face {font-family: MJXc-TeX-main-Iw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-main-R; src: local('MathJax_Main'), local('MathJax_Main-Regular')}
@font-face {font-family: MJXc-TeX-main-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-math-I; src: local('MathJax_Math Italic'), local('MathJax_Math-Italic')}
@font-face {font-family: MJXc-TeX-math-Ix; src: local('MathJax_Math'); font-style: italic}
@font-face {font-family: MJXc-TeX-math-Iw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-size1-R; src: local('MathJax_Size1'), local('MathJax_Size1-Regular')}
@font-face {font-family: MJXc-TeX-size1-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-size2-R; src: local('MathJax_Size2'), local('MathJax_Size2-Regular')}
@font-face {font-family: MJXc-TeX-size2-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-size3-R; src: local('MathJax_Size3'), local('MathJax_Size3-Regular')}
@font-face {font-family: MJXc-TeX-size3-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-size4-R; src: local('MathJax_Size4'), local('MathJax_Size4-Regular')}
@font-face {font-family: MJXc-TeX-size4-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-vec-R; src: local('MathJax_Vector'), local('MathJax_Vector-Regular')}
@font-face {font-family: MJXc-TeX-vec-Rw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Vector-Regular.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Vector-Regular.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Vector-Regular.otf') format('opentype')}
@font-face {font-family: MJXc-TeX-vec-B; src: local('MathJax_Vector Bold'), local('MathJax_Vector-Bold')}
@font-face {font-family: MJXc-TeX-vec-Bx; src: local('MathJax_Vector'); font-weight: bold}
@font-face {font-family: MJXc-TeX-vec-Bw; src /*1*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/eot/MathJax_Vector-Bold.eot'); src /*2*/: url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/woff/MathJax_Vector-Bold.woff') format('woff'), url('https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Vector-Bold.otf') format('opentype')}

View File

@ -1,35 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[assoc.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#assoc.qty'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.4</a> Unit <a class='abbr_ref' href='qty.unit.html#assoc.qty'>[qty.unit]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.4.9</a> Associated quantity <a class='abbr_ref'>[assoc.qty]</a></h4><div class='texpara'><div id='lib:has-associated-quantity,Unit'><div id='lib:Unit,has-associated-quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Unit,has-associated-quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='texttt'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >has-associated-quantity</i></span><span class='parenthesis'>(</span>U<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3237'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <ul class='itemize'><li id='1.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.1'>(1.1)</a></div><div class='texpara'><div id='1.1.sentence-1' class='sentence'>If <span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >quantity-spec</i></span></span> is a valid expression,
returns <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#1.1.sentence-1'>.</a></div></div></li><li id='1.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.2'>(1.2)</a></div><div class='texpara'><div id='1.2.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >reference-unit</i></span></span> is a valid expression,
returns
<span class='codeblock'><i >has-associated-quantity</i><span class='parenthesis'>(</span>U<span class='operator'>::</span><i >reference-unit</i><span class='parenthesis'>)</span>
</span></div></div></li><li id='1.3'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.3'>(1.3)</a></div><div class='texpara'><div id='1.3.sentence-1' class='sentence'>Otherwise, if
<span class='texttt'><span class='texttt'><i >is-derived-from-specialization-of</i></span><span class='anglebracket'>&lt;</span>U, <span class='texttt'><i >expr-fractions</i></span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span></span>
is <span class='texttt'><span class='literal'>true</span></span>,
let <span class='texttt'>Nums</span> and <span class='texttt'>Dens</span>
be packs denoting the template arguments of
<span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >nums</i></span></span> and <span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >dens</i></span></span>, respectively<a class='hidden_link' href='#1.3.sentence-1'>.</a></div> <div id='1.3.sentence-2' class='sentence'>Returns
<span class='codeblock'><span class='parenthesis'>(</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >has-associated-quantity</i><span class='parenthesis'>(</span><i >expr-type</i><span class='anglebracket'>&lt;</span>Nums<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >has-associated-quantity</i><span class='parenthesis'>(</span><i >expr-type</i><span class='anglebracket'>&lt;</span>Dens<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
</span></div></div></li><li id='1.4'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.4'>(1.4)</a></div><div class='texpara'><div id='1.4.sentence-1' class='sentence'>Otherwise, returns <span class='texttt'><span class='literal'>false</span></span><a class='hidden_link' href='#1.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div class='texpara'><div id='lib:get-associated-quantity,AssociatedUnit'><div id='lib:AssociatedUnit,get-associated-quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:AssociatedUnit,get-associated-quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='texttt'>AssociatedUnit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='texttt'><i >get-associated-quantity</i></span><span class='parenthesis'>(</span>U u<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3273'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#2.1'>(2.1)</a></div>If <span class='texttt'>U</span> is of the form <span class='texttt'>common_<span class='shy'></span>unit<span class='anglebracket'>&lt;</span>Us<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span></span>,
returns
<span class='codeblock'>get_common_quantity_spec<span class='parenthesis'>(</span><i >get-associated-quantity</i><span class='parenthesis'>(</span>Us<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>
</span></li><li id='2.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#2.2'>(2.2)</a></div>Otherwise, if <span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >quantity-spec</i></span></span> is a valid expression,
returns
<span class='codeblock'><i >remove-kind</i><span class='parenthesis'>(</span>U<span class='operator'>::</span><i >quantity-spec</i><span class='parenthesis'>)</span>
</span></li><li id='2.3'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#2.3'>(2.3)</a></div>Otherwise, if <span class='texttt'>U<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >reference-unit</i></span></span> is a valid expression,
returns
<span class='codeblock'><i >get-associated-quantity</i><span class='parenthesis'>(</span>U<span class='operator'>::</span><i >reference-unit</i><span class='parenthesis'>)</span>
</span></li><li id='2.4'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#2.4'>(2.4)</a></div>Otherwise, if
<span class='texttt'><span class='texttt'><i >is-derived-from-specialization-of</i></span><span class='anglebracket'>&lt;</span>U, <span class='texttt'><i >expr-fractions</i></span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span></span>
is <span class='texttt'><span class='literal'>true</span></span>,
returns
<span class='codeblock'><i >expr-map</i><span class='anglebracket'>&lt;</span><i >to-quantity-spec</i>, derived_quantity_spec, <span class='keyword'>struct</span> dimensionless<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>u<span class='parenthesis'>)</span>
</span>
where <span class='texttt'><i >to-quantity-spec</i></span> is defined as follows:
<span class='codeblock'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <i >to-quantity-spec</i> <span class='operator'>=</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><i >get-associated-quantity</i><span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</span></li></ul></div></div></div></div></div></body></html>

View File

@ -1,15 +0,0 @@
div.example {
display: block;
margin-top: 5pt;
margin-bottom: 5pt;
font-size: 11pt;
color: #bb00bb;
}
div.note {
display: block;
margin-top: 5pt;
margin-bottom: 5pt;
font-size: 11pt;
color: #bb00bb;
}

File diff suppressed because one or more lines are too long

View File

@ -1,12 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[defs]</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'>3</a> Terms and definitions <a class='abbr_ref' href='index.html#defs'>[defs]</a></h1><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/intro.tex#L55'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><a class='index' id=':definitions'></a>For the purposes of this document,
the terms and definitions given in
IEC 60050-102:2007/AMD3:2021,
IEC 60050-112:2010/AMD2:2020,
ISO 80000-2:2019,
and
N4971,
and the following apply<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/intro.tex#L66'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>ISO and IEC maintain terminology databases
for use in standardization
at the following addresses:
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div>ISO Online browsing platform: available at <a href='https://www.iso.org/obp'>https://www.iso.org/obp</a></li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div>IEC Electropedia: available at <a href='http://www.electropedia.org'>http://www.electropedia.org</a></li></ul>
</div></div></div></div></body></html>

View File

@ -1,38 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[derived.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#derived.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#derived.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#derived.qty'>[qty.spec.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.3.2</a> Derived <a class='abbr_ref'>[derived.qty]</a></h4><div class='texpara'><span id='lib:derived_quantity_spec'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:derived_quantity_spec'>🔗</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><i >NamedQuantitySpec</i><a class='index' id='concept:NamedQuantitySpec'></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <i >to-dimension</i> <span class='operator'>=</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>dimension<span class='parenthesis'>)</span><span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <i >derived-quantity-spec-impl</i> <span class='operator'>:</span> <span class='comment'>// <i >exposition only</i></span>
<i >quantity-spec-interface</i>,
<i >expr-fractions</i><span class='anglebracket'>&lt;</span><span class='keyword'>struct</span> dimensionless, Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> <i >base-type</i> <span class='operator'>=</span> <i >derived-quantity-spec-impl</i>;
<span class='keyword'>using</span> <i >base</i> <span class='operator'>=</span> <i >expr-fractions</i><span class='anglebracket'>&lt;</span><span class='keyword'>struct</span> dimensionless, Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> dimension <span class='operator'>=</span>
<i >expr-map</i><span class='anglebracket'>&lt;</span><i >to-dimension</i>, derived_dimension, <span class='keyword'>struct</span> dimension_one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><i >base</i><span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_character character <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_quantity_spec <span class='keyword'>final</span> <span class='operator'>:</span> <i >derived-quantity-spec-impl</i><span class='anglebracket'>&lt;</span>Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1768'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>derived_<span class='shy'></span>quantity_<span class='shy'></span>spec</span> is used by the library
to represent the result of a quantity calculus not equal to a named quantity<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>constexpr</span> <span class='keyword'>auto</span> area <span class='operator'>=</span> pow<span class='anglebracket'>&lt;</span><span class='literal'>2</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>isq<span class='operator'>::</span>length<span class='parenthesis'>)</span>;
<span class='keyword'>int</span> x <span class='operator'>=</span> area; <span class='comment'>// error: cannot construct from <span class='tcode_in_codeblock'>derived_<span class='shy'></span>quantity_<span class='shy'></span>spec&lt;power&lt;isq&#x200b;::&#x200b;length, 2&gt;&gt;</span></span>
</span>&nbsp;<i>end example</i>]</div></div> <div id='1.sentence-2' class='sentence'>
A program that instantiates a specialization of <span class='texttt'>derived_<span class='shy'></span>quantity_<span class='shy'></span>spec</span>
that is not a possible result of the library specifications
is ill-formed, no diagnostic required<a class='hidden_link' href='#1.sentence-2'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1781'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Let
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><span class='texttt'>Nums</span> and <span class='texttt'>Dens</span>
be packs denoting the template arguments of
<span class='texttt'><span class='texttt'><i >base</i></span><span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >nums</i></span></span> and <span class='texttt'><span class='texttt'><i >base</i></span><span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >dens</i></span></span>, respectively,</li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><span class='texttt'><i >QUANTITY-CHARACTER-OF</i><span class='parenthesis'>(</span>Pack<span class='parenthesis'>)</span></span> be
<span class='codeblock'>std<span class='operator'>::</span>max<span class='parenthesis'>(</span><span class='curlybracket'>{</span>quantity_character<span class='operator'>::</span>real_scalar, <i >expr-type</i><span class='anglebracket'>&lt;</span>Pack<span class='anglebracket'>&gt;</span><span class='operator'>::</span>character<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>
</span>
and</li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><span class='texttt'>num_<span class='shy'></span>char</span> be <span class='texttt'><i >QUANTITY-CHARACTER-OF</i><span class='parenthesis'>(</span>Nums<span class='parenthesis'>)</span></span> and
<span class='texttt'>den_<span class='shy'></span>char</span> be <span class='texttt'><i >QUANTITY-CHARACTER-OF</i><span class='parenthesis'>(</span>Dens<span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></li></ul></div> <div id='2.sentence-2' class='sentence'>
The member <span class='texttt'>character</span> is equal to
<span class='texttt'>quantity_<span class='shy'></span>character<span class='operator'>&#x200b;::&#x200b;</span>real_<span class='shy'></span>scalar</span> if <span class='texttt'>num_<span class='shy'></span>char <span class='operator'>=</span><span class='operator'>=</span> den_<span class='shy'></span>char</span> is <span class='texttt'><span class='literal'>true</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>max<span class='parenthesis'>(</span>num_<span class='shy'></span>char, den_<span class='shy'></span>char<span class='parenthesis'>)</span></span> otherwise<a class='hidden_link' href='#2.sentence-2'>.</a></div></div></div></div></body></html>

View File

@ -1,6 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[dimless.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#dimless.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#dimless.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#dimless.qty'>[qty.spec.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.3.3</a> Base quantity of dimension one <a class='abbr_ref'>[dimless.qty]</a></h4><div class='texpara'><span id='lib:dimensionless'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimensionless'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> dimensionless <span class='keyword'>final</span> <span class='operator'>:</span> quantity_spec<span class='anglebracket'>&lt;</span>derived_quantity_spec<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1813'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>dimensionless</span> represents the base quantity of dimension one (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-13">IEC 60050, 112-01-13</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,22 +0,0 @@
div.example {
display: block;
margin-top: 5pt;
margin-bottom: 5pt;
font-size: 9pt;
}
div.note {
display: block;
margin-top: 5pt;
margin-bottom: 5pt;
font-size: 9pt;
}
div.note .texttt { font-size: 9pt; }
div.example .texttt { font-size: 9pt; }
div.note .textsf { font-family: 'Noto Sans'; font-size: 9pt; }
div.example .textsf { font-family: 'Noto Sans'; font-size: 9pt; }
div.note .math { font-size: 9pt; }
div.example .math { font-size: 9pt; }

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>14882: Figures</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>Figures <a href='index.html#fig' class='abbr_ref'>[fig]</a></h1></div></body></html>

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>14882: Footnotes</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>List of Footnotes</h1></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>14882: Index</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 >Index</h1><hr><h2 ><a href='#A'>A</a> <a href='#D'>D</a></h2><h2 ><a href='#M'>M</a> <a href='#N'>N</a> <a href='#O'>O</a> <a href='#Q'>Q</a> <a href='#R'>R</a> <a href='#S'>S</a> <a href='#U'>U</a></h2><hr><h2 ><a id='A'>A</a></h2><div id=':absolute_origin'><div class='indexitems'>absolute origin, <i>see</i> <a href='#:origin,absolute'>origin, absolute</a></div></div><h2 ><a id='D'>D</a></h2><div id=':definitions'><div class='indexitems'>definitions, <a href='defs.html#:definitions'>[defs]</a></div></div><h2 ><a id='M'>M</a></h2><div id=':module'><div class='indexitems'>module<div id=':module,mp-units'><div class='indexitems'>mp-units, <a href='spec.mods.html#def:module,mp-units'><b >[spec.<span class='shy'></span>mods]</b></a></div></div></div></div><div id=':mp-units_library'><div class='indexitems'>mp-units library, <a href='scope.html#def:mp-units_library'><b >[scope]</b></a></div></div><h2 ><a id='N'>N</a></h2><div id=':named_quantity'><div class='indexitems'>named quantity, <i>see</i> <a href='#:quantity,named'>quantity, named</a></div></div><div id=':named_unit'><div class='indexitems'>named unit, <i>see</i> <a href='#:unit,named'>unit, named</a></div></div><h2 ><a id='O'>O</a></h2><div id=':origin'><div class='indexitems'>origin, <a href='qty.pt.orig.general.html#def:origin'><b >[qty.<span class='shy'></span>pt.<span class='shy'></span>orig.<span class='shy'></span>general]</b></a><div id=':origin,absolute'><div class='indexitems'>absolute, <a href='qty.abs.pt.orig.html#def:origin,absolute'><b >[qty.<span class='shy'></span>abs.<span class='shy'></span>pt.<span class='shy'></span>orig]</b></a></div></div><div id=':origin,relative'><div class='indexitems'>relative, <a href='qty.rel.pt.orig.html#def:origin,relative'><b >[qty.<span class='shy'></span>rel.<span class='shy'></span>pt.<span class='shy'></span>orig]</b></a></div></div></div></div><h2 ><a id='Q'>Q</a></h2><div id=':quantity'><div class='indexitems'>quantity<div id=':quantity,named'><div class='indexitems'>named, <a href='named.qty.html#def:quantity,named'><b >[named.<span class='shy'></span>qty]</b></a></div></div></div></div><h2 ><a id='R'>R</a></h2><div id=':references'><div class='indexitems'>references, <a href='refs.html#:references'>[refs]</a></div></div><div id=':relative_origin'><div class='indexitems'>relative origin, <i>see</i> <a href='#:origin,relative'>origin, relative</a></div></div><h2 ><a id='S'>S</a></h2><div id=':scope'><div class='indexitems'>scope, <a href='scope.html#:scope'>[scope]</a></div></div><h2 ><a id='U'>U</a></h2><div id=':unit'><div class='indexitems'>unit<div id=':unit,named'><div class='indexitems'>named, <a href='qty.named.unit.html#def:unit,named'><b >[qty.<span class='shy'></span>named.<span class='shy'></span>unit]</b></a></div></div></div></div></div></body></html>

View File

@ -1,45 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[get.common.qty.spec]</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#get.common.qty.spec'>[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#get.common.qty.spec'>[qty.spec]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.3.6</a> Hierarchy algorithms <a class='abbr_ref' href='qty.spec.hier.algos.html#get.common.qty.spec'>[qty.spec.hier.algos]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.6.3</a> Get common quantity specification <a class='abbr_ref'>[get.common.qty.spec]</a></h4><div class='texpara'><div id='lib:QuantitySpec,get_common_quantity_spec'><div id='lib:get_common_quantity_spec,QuantitySpec'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_common_quantity_spec,QuantitySpec'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> get_common_quantity_spec<span class='parenthesis'>(</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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> qs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2147'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Let
<ul class='itemize'><li id='1.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.1'>(1.1)</a></div><span class='texttt'>q1</span> be <span class='texttt'>qs<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='squarebracket'>[</span><span class='literal'>0</span><span class='squarebracket'>]</span></span>,</li><li id='1.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.2'>(1.2)</a></div><span class='texttt'>q2</span> be <span class='texttt'>qs<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='squarebracket'>[</span><span class='literal'>1</span><span class='squarebracket'>]</span></span>,</li><li id='1.3'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.3'>(1.3)</a></div><span class='texttt'>Q1</span> be <span class='texttt'><span class='keyword'>decltype</span><span class='parenthesis'>(</span>q1<span class='parenthesis'>)</span></span>,</li><li id='1.4'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.4'>(1.4)</a></div><span class='texttt'>Q2</span> be <span class='texttt'><span class='keyword'>decltype</span><span class='parenthesis'>(</span>q2<span class='parenthesis'>)</span></span>, and</li><li id='1.5'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.5'>(1.5)</a></div><span class='texttt'>rest</span> be a pack denoting the elements of <span class='texttt'>qs</span> without <span class='texttt'>q1</span> and <span class='texttt'>q2</span><a class='hidden_link' href='#1.sentence-1'>.</a></li></ul></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2162'>#</a></div><div class='texpara'><div id='2.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><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>qs<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>1</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q1;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>qs<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>2</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> QQ1 <span class='operator'>=</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><i >remove-kind</i><span class='parenthesis'>(</span>q1<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>using</span> QQ2 <span class='operator'>=</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><i >remove-kind</i><span class='parenthesis'>(</span>q2<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>std<span class='operator'>::</span>is_same_v<span class='anglebracket'>&lt;</span>Q1, Q2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q1;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><a class='index' id='conceptref:NestedQuantityKindSpecOf'></a><i >NestedQuantityKindSpecOf</i><span class='anglebracket'>&lt;</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> QQ1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><a class='index' id='conceptref:NestedQuantityKindSpecOf_'></a><i >NestedQuantityKindSpecOf</i><span class='anglebracket'>&lt;</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> QQ2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='parenthesis'>(</span><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span>Q1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>!</span><a class='index' id='conceptref:QuantityKindSpec_'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span>Q2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span><a class='index' id='conceptref:DerivedQuantitySpec'></a><i >DerivedQuantitySpec</i><span class='anglebracket'>&lt;</span>QQ1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:NamedQuantitySpec'></a><i >NamedQuantitySpec</i><span class='anglebracket'>&lt;</span>QQ2<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
implicitly_convertible<span class='parenthesis'>(</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q2;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:QuantityKindSpec__'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span>Q1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:QuantityKindSpec___'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span>Q2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span><a class='index' id='conceptref:NamedQuantitySpec_'></a><i >NamedQuantitySpec</i><span class='anglebracket'>&lt;</span>QQ1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:DerivedQuantitySpec_'></a><i >DerivedQuantitySpec</i><span class='anglebracket'>&lt;</span>QQ2<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
implicitly_convertible<span class='parenthesis'>(</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q1;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='keyword'>constexpr</span> <span class='keyword'>auto</span> common_base <span class='operator'>=</span> <i >get-common-base</i><span class='anglebracket'>&lt;</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <span class='operator'>*</span>common_base;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q2;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> q1;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span><i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>,
<i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <i >get-kind-tree-root</i><span class='parenthesis'>(</span>q2<span class='parenthesis'>)</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <i >get-kind-tree-root</i><span class='parenthesis'>(</span>q1<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span> <span class='keyword'>else</span>
<span class='keyword'>return</span> get_common_quantity_spec<span class='parenthesis'>(</span>get_common_quantity_spec<span class='parenthesis'>(</span>q1, q2<span class='parenthesis'>)</span>, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2201'>#</a></div><div class='texpara'><div id='3.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'><span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>qs<span class='parenthesis'>)</span> <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>qs<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>1</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>qs<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>2</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><a class='index' id='conceptref:QuantitySpecConvertibleTo'></a><i >QuantitySpecConvertibleTo</i><span class='anglebracket'>&lt;</span><i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, <i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<a class='index' id='conceptref:QuantitySpecConvertibleTo_'></a><i >QuantitySpecConvertibleTo</i><span class='anglebracket'>&lt;</span><i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, <i >get-kind-tree-root</i><span class='parenthesis'>(</span>Q1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_common_quantity_spec<span class='parenthesis'>(</span>get_common_quantity_spec<span class='parenthesis'>(</span>q1, q2<span class='parenthesis'>)</span>, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
</span></div></div></div></div></div></body></html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>14882: Index of implementation-defined behavior</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 >Index of implementation-defined behavior</h1><div id=':behavior_of_unit-magnitude_operations_that_do_not_fit_in_a_std::intmax_t'><div class='indexitems'>behavior of <span class='texttt'><i >unit-magnitude</i></span> operations that do not fit in a <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>intmax_<span class='shy'></span>t</span>, <a href='qty.unit.mag.types.html#:behavior_of_unit-magnitude_operations_that_do_not_fit_in_a_std::intmax_t'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>types]</a></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,11 +0,0 @@
<!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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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>

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>14882: Index of library modules</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 >Index of library modules</h1><div id='moduleref:mp_units'><div class='indexitems'><span class='texttt'><span class='frenchspacing'></span>mp_<span class='shy'></span>units</span>, <a href='mp.units.syn.html#module:mp_units'><b >[mp.<span class='shy'></span>units.<span class='shy'></span>syn]</b></a></div></div><div id='moduleref:mp_units.core'><div class='indexitems'><span class='texttt'><span class='frenchspacing'></span>mp_<span class='shy'></span>units.core</span>, <a href='mp.units.core.syn.html#module:mp_units.core'><b >[mp.<span class='shy'></span>units.<span class='shy'></span>core.<span class='shy'></span>syn]</b></a></div></div><div id='moduleref:mp_units.systems'><div class='indexitems'><span class='texttt'><span class='frenchspacing'></span>mp_<span class='shy'></span>units.systems</span>, <a href='mp.units.systems.syn.html#module:mp_units.systems'><b >[mp.<span class='shy'></span>units.<span class='shy'></span>systems.<span class='shy'></span>syn]</b></a></div></div></div></body></html>

View File

@ -1,628 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[mp.units.core.syn]</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.2</a> mp-units module synopses <a class='abbr_ref' href='mp.units.syns.html#mp.units.core.syn'>[mp.units.syns]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.2.2</a> Module <span class='texttt'>mp_<span class='shy'></span>units.core</span> synopsis <a class='abbr_ref'>[mp.units.core.syn]</a></h3><div class='texpara'><span id='module:mp_units.core'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units.core'>🔗</a></div><span class='codeblock'><span class='comment'>// mostly freestanding</span>
<span class='keyword'>export</span> <span class='keyword'>module</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>import</span> std;
<span class='keyword'>export</span> <span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.utils.html' title='5.3&emsp;Utilities'>[qty.<span class='shy'></span>utils]</a>, utilities</span>
<span class='comment'>// <a href='qty.sym.txt.html' title='5.3.3&emsp;Symbol text'>[qty.<span class='shy'></span>sym.<span class='shy'></span>txt]</a>, symbol text</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:character_set'><a class='hidden_link' href='#lib:character_set' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>character_set</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span> utf8, portable, default_character_set <span class='operator'>=</span> utf8 <span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>size_t N, std<span class='operator'>::</span>size_t M<span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> symbol_text;
<span class='comment'>// <a href='qty.sym.expr.html' title='5.3.4&emsp;Symbolic expressions'>[qty.<span class='shy'></span>sym.<span class='shy'></span>expr]</a>, symbolic expressions</span>
<span class='comment'>// <a href='qty.sym.expr.types.html' title='5.3.4.3&emsp;Types'>[qty.<span class='shy'></span>sym.<span class='shy'></span>expr.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Ts<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> per;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> F, <span class='keyword'>int</span> Num, <span class='keyword'>int</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Den<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> power;
<span class='comment'>// <a href='qty.ref.html' title='5.4&emsp;Reference'>[qty.<span class='shy'></span>ref]</a>, reference</span>
<span class='comment'>// <a href='qty.dim.html' title='5.4.2&emsp;Dimension'>[qty.<span class='shy'></span>dim]</a>, dimension</span>
<span class='comment'>// <a href='qty.dim.concepts.html' title='5.4.2.2&emsp;Concepts'>[qty.<span class='shy'></span>dim.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Dimension <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> DimensionOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.dim.types.html' title='5.4.2.3&emsp;Types'>[qty.<span class='shy'></span>dim.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> base_dimension;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_dimension;
<span class='keyword'>struct</span> dimension_one;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> dimension_one <span id='lib:dimension_one'><a class='hidden_link' href='qty.dim.types.html#lib:dimension_one' title='5.4.2.3&emsp;Types&emsp;[qty.dim.types]'>dimension_one</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.dim.ops.html' title='5.4.2.4&emsp;Operations'>[qty.<span class='shy'></span>dim.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>D d<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.dim.sym.fmt.html' title='5.4.2.5&emsp;Symbol formatting'>[qty.<span class='shy'></span>dim.<span class='shy'></span>sym.<span class='shy'></span>fmt]</a>, symbol formatting</span>
<span class='keyword'>struct</span> <span id='lib:dimension_symbol_formatting'><a class='hidden_link' href='#lib:dimension_symbol_formatting' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>dimension_symbol_formatting</a></span> <span class='curlybracket'>{</span>
character_set char_set <span class='operator'>=</span> character_set<span class='operator'>::</span>default_character_set;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out dimension_symbol_to<span class='parenthesis'>(</span>Out out, D d, <span class='keyword'>const</span> dimension_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>dimension_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view dimension_symbol<span class='parenthesis'>(</span>D<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.spec.html' title='5.4.3&emsp;Quantity specification'>[qty.<span class='shy'></span>spec]</a>, quantity specification</span>
<span class='comment'>// <a href='qty.spec.concepts.html' title='5.4.3.2&emsp;Concepts'>[qty.<span class='shy'></span>spec.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantitySpec <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantitySpecOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.spec.types.html' title='5.4.3.3&emsp;Types'>[qty.<span class='shy'></span>spec.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='named.qty.html' title='5.4.3.3.1&emsp;Named'>[named.<span class='shy'></span>qty]</a>, named</span>
<span class='keyword'>struct</span> is_kind;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> is_kind <span id='lib:is_kind'><a class='hidden_link' href='named.qty.html#lib:is_kind' title='5.4.3.3.1&emsp;Named&emsp;[named.qty]'>is_kind</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:BaseDimension'></a><i >BaseDimension</i> <span class='keyword'>auto</span> Dim, <a class='index' id='conceptref:QSProperty'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>Dim, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:DerivedQuantitySpec'></a><i >DerivedQuantitySpec</i> <span class='keyword'>auto</span> Eq, <a class='index' id='conceptref:QSProperty_'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>Eq, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:NamedQuantitySpec'></a><i >NamedQuantitySpec</i> <span class='keyword'>auto</span> QS, <a class='index' id='conceptref:QSProperty__'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>QS, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:NamedQuantitySpec_'></a><i >NamedQuantitySpec</i> <span class='keyword'>auto</span> QS, <a class='index' id='conceptref:DerivedQuantitySpec_'></a><i >DerivedQuantitySpec</i> <span class='keyword'>auto</span> Eq, <a class='index' id='conceptref:QSProperty___'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>QS, Eq, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='comment'>// <a href='derived.qty.html' title='5.4.3.3.2&emsp;Derived'>[derived.<span class='shy'></span>qty]</a>, derived</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant_'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_quantity_spec;
<span class='comment'>// <a href='dimless.qty.html' title='5.4.3.3.3&emsp;Base quantity of dimension one'>[dimless.<span class='shy'></span>qty]</a>, base quantity of dimension one</span>
<span class='keyword'>struct</span> dimensionless;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> dimensionless <span id='lib:dimensionless'><a class='hidden_link' href='dimless.qty.html#lib:dimensionless' title='5.4.3.3.3&emsp;Base quantity of dimension one&emsp;[dimless.qty]'>dimensionless</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='kind.of.qty.html' title='5.4.3.3.4&emsp;Kind of'>[kind.<span class='shy'></span>of.<span class='shy'></span>qty]</a>, kind of</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> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> kind_of_;
<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> <span class='keyword'>auto</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> kind_of_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>; <span class='curlybracket'>}</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> kind_of_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:kind_of'><a class='hidden_link' href='#lib:kind_of' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>kind_of</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.spec.ops.html' title='5.4.3.5&emsp;Operations'>[qty.<span class='shy'></span>spec.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</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>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>Q q<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.spec.hier.algos.html' title='5.4.3.6&emsp;Hierarchy algorithms'>[qty.<span class='shy'></span>spec.<span class='shy'></span>hier.<span class='shy'></span>algos]</a>, hierarchy algorithms</span>
<span class='comment'>// <a href='qty.spec.conv.html' title='5.4.3.6.1&emsp;Conversion'>[qty.<span class='shy'></span>spec.<span class='shy'></span>conv]</a>, conversion</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> implicitly_convertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> explicitly_convertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> castable<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> interconvertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> qs1, <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> <span class='keyword'>auto</span> qs2<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.get.kind.html' title='5.4.3.6.2&emsp;Get kind'>[qty.<span class='shy'></span>get.<span class='shy'></span>kind]</a>, <span class='tcode_in_codeblock'>get_<span class='shy'></span>kind</span></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'>consteval</span> <i ><span class='texttt'>see below</span></i> get_kind<span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='get.common.qty.spec.html' title='5.4.3.6.3&emsp;Get common quantity specification'>[get.<span class='shy'></span>common.<span class='shy'></span>qty.<span class='shy'></span>spec]</a>, <span class='tcode_in_codeblock'>get_<span class='shy'></span>common_<span class='shy'></span>quantity_<span class='shy'></span>spec</span></span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_common_quantity_spec<span class='parenthesis'>(</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> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> qs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.html' title='5.4.4&emsp;Unit'>[qty.<span class='shy'></span>unit]</a>, unit</span>
<span class='comment'>// <a href='qty.unit.mag.html' title='5.4.4.2&emsp;Magnitude'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag]</a>, magnitude</span>
<span class='comment'>// <a href='qty.unit.mag.concepts.html' title='5.4.4.2.2&emsp;Concepts'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> MagConstant <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> UnitMagnitude <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.mag.types.html' title='5.4.4.2.3&emsp;Types'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <span class='keyword'>long</span> <span class='keyword'>double</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Value <span class='anglebracket'>&gt;</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>struct</span> mag_constant;
<span class='comment'>// <a href='qty.unit.mag.ops.html' title='5.4.4.2.4&emsp;Operations'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:MagArg'></a><i >MagArg</i> <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t N, std<span class='operator'>::</span>intmax_t D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>N <span class='anglebracket'>&gt;</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude_'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag_ratio <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:MagArg_'></a><i >MagArg</i> <span class='keyword'>auto</span> Base, <span class='keyword'>int</span> Num, <span class='keyword'>int</span> Den <span class='operator'>=</span> <span class='literal'>1</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude__'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag_power <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// constants</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:pi'><a class='hidden_link' href='#lib:pi' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>pi</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
mag_constant<span class='anglebracket'>&lt;</span><span class='curlybracket'>{</span><span class='literal'>u8"\u03C0"</span> <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+03c0</span> <span class='uname'>GREEK SMALL LETTER PI</span></span> */</span>, <span class='literal'>"pi"</span><span class='curlybracket'>}</span>,
std<span class='operator'>::</span>numbers<span class='operator'>::</span>pi_v<span class='anglebracket'>&lt;</span><span class='keyword'>long</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:pi_'><a class='hidden_link' href='#lib:pi' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>pi</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> \u03C0 <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+03c0</span> <span class='uname'>GREEK SMALL LETTER PI</span></span> */</span> <span class='operator'>=</span> pi;
<span class='comment'>// <a href='qty.unit.traits.html' title='5.4.4.3&emsp;Traits'>[qty.<span class='shy'></span>unit.<span class='shy'></span>traits]</a>, traits</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> space_before_unit_symbol <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:space_before_unit_symbol,one'></a>space_before_unit_symbol<span class='anglebracket'>&lt;</span>one<span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='comment'>// <a href='qty.unit.concepts.html' title='5.4.4.4&emsp;Concepts'>[qty.<span class='shy'></span>unit.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Unit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PrefixableUnit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> AssociatedUnit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> U, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> UnitOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.types.html' title='5.4.4.5&emsp;Types'>[qty.<span class='shy'></span>unit.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='qty.scaled.unit.html' title='5.4.4.5.2&emsp;Scaled'>[qty.<span class='shy'></span>scaled.<span class='shy'></span>unit]</a>, scaled</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude___'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> M, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> scaled_unit;
<span class='comment'>// <a href='qty.named.unit.html' title='5.4.4.5.3&emsp;Named'>[qty.<span class='shy'></span>named.<span class='shy'></span>unit]</a>, named</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> named_unit; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a class='index' id='conceptref:QuantityKindSpec_'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS, <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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, QS, PO<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U, <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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, PO<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> U, <a class='index' id='conceptref:QuantityKindSpec__'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> U, <a class='index' id='conceptref:QuantityKindSpec___'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS,
<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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, QS, PO<span class='anglebracket'>&gt;</span>;
<span class='comment'>// <a href='qty.prefixed.unit.html' title='5.4.4.5.4&emsp;Prefixed'>[qty.<span class='shy'></span>prefixed.<span class='shy'></span>unit]</a>, prefixed</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude____'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> M, <a href='qty.unit.concepts.html#concept:PrefixableUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:PrefixableUnit'><span class='tcode_in_codeblock'>PrefixableUnit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> prefixed_unit;
<span class='comment'>// <a href='qty.common.unit.html' title='5.4.4.5.5&emsp;Common'>[qty.<span class='shy'></span>common.<span class='shy'></span>unit]</a>, common</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____'><span class='tcode_in_codeblock'>Unit</span></span></a> U1, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____'><span class='tcode_in_codeblock'>Unit</span></span></a> U2, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______'><span class='tcode_in_codeblock'>Unit</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> common_unit;
<span class='comment'>// <a href='qty.derived.unit.html' title='5.4.4.5.6&emsp;Derived'>[qty.<span class='shy'></span>derived.<span class='shy'></span>unit]</a>, derived</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant__'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_unit;
<span class='comment'>// <a href='qty.unit.one.html' title='5.4.4.5.7&emsp;One'>[qty.<span class='shy'></span>unit.<span class='shy'></span>one]</a>, one</span>
<span class='keyword'>struct</span> one;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> one <span id='lib:one'><a class='hidden_link' href='qty.unit.one.html#lib:one' title='5.4.4.5.7&emsp;One&emsp;[qty.unit.one]'>one</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// named derived units of a quantity of dimension one</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:percent'><a class='hidden_link' href='#lib:percent' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>percent</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> named_unit<span class='anglebracket'>&lt;</span><span class='literal'>"%"</span>, mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>100</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:percent_'><a class='hidden_link' href='#lib:percent' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>percent</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:per_mille'><a class='hidden_link' href='#lib:per_mille' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>per_mille</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
named_unit<span class='anglebracket'>&lt;</span>symbol_text<span class='curlybracket'>{</span><span class='literal'>u8"\u2030"</span> <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+2030</span> <span class='uname'>PER MILLE SIGN</span></span> */</span>, <span class='literal'>"%o"</span><span class='curlybracket'>}</span>,
mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>1000</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:per_mille_'><a class='hidden_link' href='#lib:per_mille' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>per_mille</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:parts_per_million'><a class='hidden_link' href='#lib:parts_per_million' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>parts_per_million</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
named_unit<span class='anglebracket'>&lt;</span><span class='literal'>"ppm"</span>, mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>1'000'000</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:parts_per_million_'><a class='hidden_link' href='#lib:parts_per_million' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>parts_per_million</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span id='lib:ppm'><a class='hidden_link' href='#lib:ppm' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>ppm</a></span> <span class='operator'>=</span> parts_per_million;
<span class='comment'>// <a href='qty.unit.ops.html' title='5.4.4.6&emsp;Operations'>[qty.<span class='shy'></span>unit.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>U u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> square<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> cubic<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.unit.cmp.html' title='5.4.4.7&emsp;Comparison'>[qty.<span class='shy'></span>unit.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________________'><span class='tcode_in_codeblock'>Unit</span></span></a> From, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________________'><span class='tcode_in_codeblock'>Unit</span></span></a> To<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>From from, To to<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.unit.obs.html' title='5.4.4.8&emsp;Observers'>[qty.<span class='shy'></span>unit.<span class='shy'></span>obs]</a>, observers</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_quantity_spec<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit__'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_unit<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit___'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_common_unit<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> us<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.sym.fmt.html' title='5.4.4.10&emsp;Symbol formatting'>[qty.<span class='shy'></span>unit.<span class='shy'></span>sym.<span class='shy'></span>fmt]</a>, symbol formatting</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:unit_symbol_solidus'><a class='hidden_link' href='#lib:unit_symbol_solidus' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_solidus</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span>
one_denominator,
always,
never,
default_denominator <span class='operator'>=</span> one_denominator
<span class='curlybracket'>}</span>;
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:unit_symbol_separator'><a class='hidden_link' href='#lib:unit_symbol_separator' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_separator</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span>
space,
half_high_dot,
default_separator <span class='operator'>=</span> space
<span class='curlybracket'>}</span>;
<span class='keyword'>struct</span> <span id='lib:unit_symbol_formatting'><a class='hidden_link' href='#lib:unit_symbol_formatting' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_formatting</a></span> <span class='curlybracket'>{</span>
character_set char_set <span class='operator'>=</span> character_set<span class='operator'>::</span>default_character_set;
unit_symbol_solidus solidus <span class='operator'>=</span> unit_symbol_solidus<span class='operator'>::</span>default_denominator;
unit_symbol_separator separator <span class='operator'>=</span> unit_symbol_separator<span class='operator'>::</span>default_separator;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out unit_symbol_to<span class='parenthesis'>(</span>Out out, U u, <span class='keyword'>const</span> unit_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>unit_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view unit_symbol<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.ref.concepts.html' title='5.4.5&emsp;Concepts'>[qty.<span class='shy'></span>ref.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:Reference'><span id='lib:Reference'><span class='tcode_in_codeblock'>Reference</span></span></span></a> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='qty.ref.concepts.html#concept:ReferenceOf' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:ReferenceOf'><span id='lib:ReferenceOf'><span class='tcode_in_codeblock'>ReferenceOf</span></span></span></a> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.ref.syn.html' title='5.4.6&emsp;Class template reference'>[qty.<span class='shy'></span>ref.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>reference</span></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, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> reference;
<span class='comment'>// <a href='qty.ref.ops.html' title='5.4.7&emsp;Operations'>[qty.<span class='shy'></span>ref.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit'></a><i >OffsetUnit</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R r<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='tcode_in_codeblock'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit_'></a><i >OffsetUnit</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</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>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='comment'>// <a href='qty.ref.obs.html' title='5.4.9&emsp;Observers'>[qty.<span class='shy'></span>ref.<span class='shy'></span>obs]</a>, observers</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_unit<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> get_common_reference<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u1,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit______'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u2,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_______'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference________'><span class='tcode_in_codeblock'>Reference</span></span></a> R1, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_________'><span class='tcode_in_codeblock'>Reference</span></span></a> R2, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__________'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> get_common_reference<span class='parenthesis'>(</span>R1 r1, R2 r2, Rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.rep.html' title='5.5&emsp;Representation'>[qty.<span class='shy'></span>rep]</a>, representation</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:quantity_character'><a class='hidden_link' href='#lib:quantity_character' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>quantity_character</a></span> <span class='curlybracket'>{</span> scalar, complex, vector, tensor <span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.rep.traits.html' title='5.5.2&emsp;Traits'>[qty.<span class='shy'></span>rep.<span class='shy'></span>traits]</a>, traits</span>
<span class='comment'>// <a href='qty.fp.traits.html' title='5.5.2.1&emsp;Floating-point'>[qty.<span class='shy'></span>fp.<span class='shy'></span>traits]</a>, floating-point</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'>constexpr</span> <span class='keyword'>bool</span> treat_as_floating_point <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.char.traits.html' title='5.5.2.2&emsp;Quantity character'>[qty.<span class='shy'></span>char.<span class='shy'></span>traits]</a>, quantity character</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_scalar <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:disable_scalar,bool'></a>disable_scalar<span class='anglebracket'>&lt;</span><span class='keyword'>bool</span><span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:disable_scalar,std::complex'></a>disable_scalar<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>complex<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_complex <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_vector <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='comment'>// <a href='qty.val.traits.html' title='5.5.2.3&emsp;Values'>[qty.<span class='shy'></span>val.<span class='shy'></span>traits]</a>, values</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> representation_values;
<span class='comment'>// <a href='qty.rep.cpos.html' title='5.5.3&emsp;Customization point objects'>[qty.<span class='shy'></span>rep.<span class='shy'></span>cpos]</a>, customization point objects</span>
<span class='keyword'>inline</span> <span class='keyword'>namespace</span> <i ><span class='texttt'>unspecified</span></i> <span class='curlybracket'>{</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> real <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> imag <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> modulus <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> magnitude <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='curlybracket'>}</span>
<span class='comment'>// <a href='qty.rep.concepts.html' title='5.5.4&emsp;Concepts'>[qty.<span class='shy'></span>rep.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Representation <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, quantity_character Ch<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> RepresentationOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.html' title='5.6&emsp;Quantity'>[qty]</a>, quantity</span>
<span class='comment'>// <a href='qty.like.html' title='5.6.2&emsp;Interoperability'>[qty.<span class='shy'></span>like]</a>, interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_like_traits; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityLike <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.syn.html' title='5.6.3&emsp;Class template quantity'>[qty.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>quantity</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Quantity <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R, <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> quantity;
<span class='comment'>// <a href='qty.delta.html' title='5.6.14&emsp;Construction helper delta'>[qty.<span class='shy'></span>delta]</a>, construction helper <span class='tcode_in_codeblock'>delta</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> delta_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> delta_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:delta'><a class='hidden_link' href='#lib:delta' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>delta</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.non.mem.conv.html' title='5.6.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>, non-member conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span><i ><span class='texttt'>see below</span></i>, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> 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> ToQ, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</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> <span class='keyword'>auto</span> ToQS, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> quantity_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='comment'>// <a href='qty.common.type.html' title='5.6.16&emsp;std&#x200b;::&#x200b;common_&shy;type specializations'>[qty.<span class='shy'></span>common.<span class='shy'></span>type]</a>, <span class='tcode_in_codeblock'>std&#x200b;::&#x200b;common_<span class='shy'></span>type</span> specializations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q1, mp_units<span class='operator'>::</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> Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q1, Q2<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span>; <span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Value, Q<span class='anglebracket'>&gt;</span> <span class='operator'>:</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.pt.html' title='5.7&emsp;Quantity point'>[qty.<span class='shy'></span>pt]</a>, quantity point</span>
<span class='comment'>// <a href='qty.pt.orig.html' title='5.7.2&emsp;Point origin'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, point origin</span>
<span class='comment'>// <a href='qty.pt.orig.concepts.html' title='5.7.2.2&emsp;Concepts'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PointOrigin <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PointOriginFor <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.orig.types.html' title='5.7.2.3&emsp;Types'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='qty.abs.pt.orig.html' title='5.7.2.3.1&emsp;Absolute'>[qty.<span class='shy'></span>abs.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, absolute</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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> absolute_point_origin;
<span class='comment'>// <a href='qty.rel.pt.orig.html' title='5.7.2.3.2&emsp;Relative'>[qty.<span class='shy'></span>rel.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, relative</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> relative_point_origin;
<span class='comment'>// <a href='qty.zeroth.pt.orig.html' title='5.7.2.3.3&emsp;Zeroth'>[qty.<span class='shy'></span>zeroth.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, zeroth</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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> zeroth_point_origin_;
<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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> zeroth_point_origin_<span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span> <span id='lib:zeroth_point_origin'><a class='hidden_link' href='#lib:zeroth_point_origin' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>zeroth_point_origin</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.def.pt.orig.html' title='5.7.2.5.2&emsp;Default'>[qty.<span class='shy'></span>def.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, default</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.pt.like.html' title='5.7.3&emsp;Interoperability'>[qty.<span class='shy'></span>pt.<span class='shy'></span>like]</a>, interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_point_like_traits; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPointLike <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.syn.html' title='5.7.4&emsp;Class template quantity_&shy;point'>[qty.<span class='shy'></span>pt.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>quantity_<span class='shy'></span>point</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPoint <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPointOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference________________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R,
<a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor_'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> PO <span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> quantity_point;
<span class='comment'>// <a href='qty.point.html' title='5.7.14&emsp;Construction helper point'>[qty.<span class='shy'></span>point]</a>, construction helper <span class='tcode_in_codeblock'>point</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_________________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> point_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__________________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> point_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:point'><a class='hidden_link' href='qty.point.html#lib:point' title='5.7.14&emsp;Construction helper point&emsp;[qty.point]'>point</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.pt.non.mem.conv.html' title='5.7.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>, non-member conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span><i ><span class='texttt'>see below</span></i>, <i ><span class='texttt'>see below</span></i>, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation______'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_______'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<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> ToQ, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</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> ToQP, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</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> <span class='keyword'>auto</span> ToQS, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> quantity_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></span></div></div></body></html>

View File

@ -1,5 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[mp.units.syn]</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.2</a> mp-units module synopses <a class='abbr_ref' href='mp.units.syns.html#mp.units.syn'>[mp.units.syns]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.2.1</a> Module <span class='texttt'>mp_<span class='shy'></span>units</span> synopsis <a class='abbr_ref'>[mp.units.syn]</a></h3><div class='texpara'><span id='module:mp_units'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units'>🔗</a></div><span class='codeblock'><span class='keyword'>export</span> <span class='keyword'>module</span> mp_units;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>systems;
</span></span></div></div></body></html>

View File

@ -1,654 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[mp.units.syns]</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.2</a> mp-units module synopses <a class='abbr_ref'>[mp.units.syns]</a></h2><div id='mp.units.syn' class='section'><h3 ><a class='secnum' href='#mp.units.syn' style='min-width:80pt'>5.2.1</a> Module <span class='texttt'>mp_<span class='shy'></span>units</span> synopsis <a class='abbr_ref' href='mp.units.syn.html'>[mp.units.syn]</a></h3><div class='texpara'><span id='module:mp_units'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units'>🔗</a></div><span class='codeblock'><span class='keyword'>export</span> <span class='keyword'>module</span> mp_units;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>systems;
</span></span></div></div><div id='mp.units.core.syn' class='section'><h3 ><a class='secnum' href='#mp.units.core.syn' style='min-width:80pt'>5.2.2</a> Module <span class='texttt'>mp_<span class='shy'></span>units.core</span> synopsis <a class='abbr_ref' href='mp.units.core.syn.html'>[mp.units.core.syn]</a></h3><div class='texpara'><span id='module:mp_units.core'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units.core'>🔗</a></div><span class='codeblock'><span class='comment'>// mostly freestanding</span>
<span class='keyword'>export</span> <span class='keyword'>module</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>import</span> std;
<span class='keyword'>export</span> <span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.utils.html' title='5.3&emsp;Utilities'>[qty.<span class='shy'></span>utils]</a>, utilities</span>
<span class='comment'>// <a href='qty.sym.txt.html' title='5.3.3&emsp;Symbol text'>[qty.<span class='shy'></span>sym.<span class='shy'></span>txt]</a>, symbol text</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:character_set'><a class='hidden_link' href='#lib:character_set' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>character_set</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span> utf8, portable, default_character_set <span class='operator'>=</span> utf8 <span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>size_t N, std<span class='operator'>::</span>size_t M<span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> symbol_text;
<span class='comment'>// <a href='qty.sym.expr.html' title='5.3.4&emsp;Symbolic expressions'>[qty.<span class='shy'></span>sym.<span class='shy'></span>expr]</a>, symbolic expressions</span>
<span class='comment'>// <a href='qty.sym.expr.types.html' title='5.3.4.3&emsp;Types'>[qty.<span class='shy'></span>sym.<span class='shy'></span>expr.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Ts<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> per;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> F, <span class='keyword'>int</span> Num, <span class='keyword'>int</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Den<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> power;
<span class='comment'>// <a href='qty.ref.html' title='5.4&emsp;Reference'>[qty.<span class='shy'></span>ref]</a>, reference</span>
<span class='comment'>// <a href='qty.dim.html' title='5.4.2&emsp;Dimension'>[qty.<span class='shy'></span>dim]</a>, dimension</span>
<span class='comment'>// <a href='qty.dim.concepts.html' title='5.4.2.2&emsp;Concepts'>[qty.<span class='shy'></span>dim.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Dimension <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> DimensionOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.dim.types.html' title='5.4.2.3&emsp;Types'>[qty.<span class='shy'></span>dim.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> base_dimension;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_dimension;
<span class='keyword'>struct</span> dimension_one;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> dimension_one <span id='lib:dimension_one'><a class='hidden_link' href='qty.dim.types.html#lib:dimension_one' title='5.4.2.3&emsp;Types&emsp;[qty.dim.types]'>dimension_one</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.dim.ops.html' title='5.4.2.4&emsp;Operations'>[qty.<span class='shy'></span>dim.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>D d<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.dim.sym.fmt.html' title='5.4.2.5&emsp;Symbol formatting'>[qty.<span class='shy'></span>dim.<span class='shy'></span>sym.<span class='shy'></span>fmt]</a>, symbol formatting</span>
<span class='keyword'>struct</span> <span id='lib:dimension_symbol_formatting'><a class='hidden_link' href='#lib:dimension_symbol_formatting' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>dimension_symbol_formatting</a></span> <span class='curlybracket'>{</span>
character_set char_set <span class='operator'>=</span> character_set<span class='operator'>::</span>default_character_set;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out dimension_symbol_to<span class='parenthesis'>(</span>Out out, D d, <span class='keyword'>const</span> dimension_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>dimension_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________'><span class='tcode_in_codeblock'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view dimension_symbol<span class='parenthesis'>(</span>D<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.spec.html' title='5.4.3&emsp;Quantity specification'>[qty.<span class='shy'></span>spec]</a>, quantity specification</span>
<span class='comment'>// <a href='qty.spec.concepts.html' title='5.4.3.2&emsp;Concepts'>[qty.<span class='shy'></span>spec.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantitySpec <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantitySpecOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.spec.types.html' title='5.4.3.3&emsp;Types'>[qty.<span class='shy'></span>spec.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='named.qty.html' title='5.4.3.3.1&emsp;Named'>[named.<span class='shy'></span>qty]</a>, named</span>
<span class='keyword'>struct</span> is_kind;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> is_kind <span id='lib:is_kind'><a class='hidden_link' href='named.qty.html#lib:is_kind' title='5.4.3.3.1&emsp;Named&emsp;[named.qty]'>is_kind</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:BaseDimension'></a><i >BaseDimension</i> <span class='keyword'>auto</span> Dim, <a class='index' id='conceptref:QSProperty'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>Dim, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:DerivedQuantitySpec'></a><i >DerivedQuantitySpec</i> <span class='keyword'>auto</span> Eq, <a class='index' id='conceptref:QSProperty_'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>Eq, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:NamedQuantitySpec'></a><i >NamedQuantitySpec</i> <span class='keyword'>auto</span> QS, <a class='index' id='conceptref:QSProperty__'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>QS, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:NamedQuantitySpec_'></a><i >NamedQuantitySpec</i> <span class='keyword'>auto</span> QS, <a class='index' id='conceptref:DerivedQuantitySpec_'></a><i >DerivedQuantitySpec</i> <span class='keyword'>auto</span> Eq, <a class='index' id='conceptref:QSProperty___'></a><i >QSProperty</i> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Args<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_spec<span class='anglebracket'>&lt;</span>QS, Eq, Args<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>;
<span class='comment'>// <a href='derived.qty.html' title='5.4.3.3.2&emsp;Derived'>[derived.<span class='shy'></span>qty]</a>, derived</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant_'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_quantity_spec;
<span class='comment'>// <a href='dimless.qty.html' title='5.4.3.3.3&emsp;Base quantity of dimension one'>[dimless.<span class='shy'></span>qty]</a>, base quantity of dimension one</span>
<span class='keyword'>struct</span> dimensionless;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> dimensionless <span id='lib:dimensionless'><a class='hidden_link' href='dimless.qty.html#lib:dimensionless' title='5.4.3.3.3&emsp;Base quantity of dimension one&emsp;[dimless.qty]'>dimensionless</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='kind.of.qty.html' title='5.4.3.3.4&emsp;Kind of'>[kind.<span class='shy'></span>of.<span class='shy'></span>qty]</a>, kind of</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> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> kind_of_;
<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> <span class='keyword'>auto</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> kind_of_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>; <span class='curlybracket'>}</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> kind_of_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:kind_of'><a class='hidden_link' href='#lib:kind_of' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>kind_of</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.spec.ops.html' title='5.4.3.5&emsp;Operations'>[qty.<span class='shy'></span>spec.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</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>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>Q q<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</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> <span class='keyword'>auto</span> q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.spec.hier.algos.html' title='5.4.3.6&emsp;Hierarchy algorithms'>[qty.<span class='shy'></span>spec.<span class='shy'></span>hier.<span class='shy'></span>algos]</a>, hierarchy algorithms</span>
<span class='comment'>// <a href='qty.spec.conv.html' title='5.4.3.6.1&emsp;Conversion'>[qty.<span class='shy'></span>spec.<span class='shy'></span>conv]</a>, conversion</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> implicitly_convertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> explicitly_convertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> castable<span class='parenthesis'>(</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> <span class='keyword'>auto</span> from, <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> <span class='keyword'>auto</span> to<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> interconvertible<span class='parenthesis'>(</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> <span class='keyword'>auto</span> qs1, <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> <span class='keyword'>auto</span> qs2<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.get.kind.html' title='5.4.3.6.2&emsp;Get kind'>[qty.<span class='shy'></span>get.<span class='shy'></span>kind]</a>, <span class='tcode_in_codeblock'>get_<span class='shy'></span>kind</span></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'>consteval</span> <i ><span class='texttt'>see below</span></i> get_kind<span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='get.common.qty.spec.html' title='5.4.3.6.3&emsp;Get common quantity specification'>[get.<span class='shy'></span>common.<span class='shy'></span>qty.<span class='shy'></span>spec]</a>, <span class='tcode_in_codeblock'>get_<span class='shy'></span>common_<span class='shy'></span>quantity_<span class='shy'></span>spec</span></span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_common_quantity_spec<span class='parenthesis'>(</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> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> qs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.html' title='5.4.4&emsp;Unit'>[qty.<span class='shy'></span>unit]</a>, unit</span>
<span class='comment'>// <a href='qty.unit.mag.html' title='5.4.4.2&emsp;Magnitude'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag]</a>, magnitude</span>
<span class='comment'>// <a href='qty.unit.mag.concepts.html' title='5.4.4.2.2&emsp;Concepts'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> MagConstant <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> UnitMagnitude <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.mag.types.html' title='5.4.4.2.3&emsp;Types'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>types]</a>, types</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <span class='keyword'>long</span> <span class='keyword'>double</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Value <span class='anglebracket'>&gt;</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>struct</span> mag_constant;
<span class='comment'>// <a href='qty.unit.mag.ops.html' title='5.4.4.2.4&emsp;Operations'>[qty.<span class='shy'></span>unit.<span class='shy'></span>mag.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:MagArg'></a><i >MagArg</i> <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t N, std<span class='operator'>::</span>intmax_t D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>N <span class='anglebracket'>&gt;</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude_'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag_ratio <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:MagArg_'></a><i >MagArg</i> <span class='keyword'>auto</span> Base, <span class='keyword'>int</span> Num, <span class='keyword'>int</span> Den <span class='operator'>=</span> <span class='literal'>1</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude__'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> mag_power <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// constants</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:pi'><a class='hidden_link' href='#lib:pi' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>pi</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
mag_constant<span class='anglebracket'>&lt;</span><span class='curlybracket'>{</span><span class='literal'>u8"\u03C0"</span> <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+03c0</span> <span class='uname'>GREEK SMALL LETTER PI</span></span> */</span>, <span class='literal'>"pi"</span><span class='curlybracket'>}</span>,
std<span class='operator'>::</span>numbers<span class='operator'>::</span>pi_v<span class='anglebracket'>&lt;</span><span class='keyword'>long</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:pi_'><a class='hidden_link' href='#lib:pi' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>pi</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> \u03C0 <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+03c0</span> <span class='uname'>GREEK SMALL LETTER PI</span></span> */</span> <span class='operator'>=</span> pi;
<span class='comment'>// <a href='qty.unit.traits.html' title='5.4.4.3&emsp;Traits'>[qty.<span class='shy'></span>unit.<span class='shy'></span>traits]</a>, traits</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> space_before_unit_symbol <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:space_before_unit_symbol,one'></a>space_before_unit_symbol<span class='anglebracket'>&lt;</span>one<span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='comment'>// <a href='qty.unit.concepts.html' title='5.4.4.4&emsp;Concepts'>[qty.<span class='shy'></span>unit.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Unit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PrefixableUnit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> AssociatedUnit <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> U, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> UnitOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.types.html' title='5.4.4.5&emsp;Types'>[qty.<span class='shy'></span>unit.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='qty.scaled.unit.html' title='5.4.4.5.2&emsp;Scaled'>[qty.<span class='shy'></span>scaled.<span class='shy'></span>unit]</a>, scaled</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude___'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> M, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> scaled_unit;
<span class='comment'>// <a href='qty.named.unit.html' title='5.4.4.5.3&emsp;Named'>[qty.<span class='shy'></span>named.<span class='shy'></span>unit]</a>, named</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> named_unit; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a class='index' id='conceptref:QuantityKindSpec_'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS, <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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, QS, PO<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U, <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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, PO<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> U, <a class='index' id='conceptref:QuantityKindSpec__'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> U, <a class='index' id='conceptref:QuantityKindSpec___'></a><i >QuantityKindSpec</i> <span class='keyword'>auto</span> QS,
<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> <span class='keyword'>auto</span> PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> named_unit<span class='anglebracket'>&lt;</span>Symbol, U, QS, PO<span class='anglebracket'>&gt;</span>;
<span class='comment'>// <a href='qty.prefixed.unit.html' title='5.4.4.5.4&emsp;Prefixed'>[qty.<span class='shy'></span>prefixed.<span class='shy'></span>unit]</a>, prefixed</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>symbol_text Symbol, <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude____'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> M, <a href='qty.unit.concepts.html#concept:PrefixableUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:PrefixableUnit'><span class='tcode_in_codeblock'>PrefixableUnit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> prefixed_unit;
<span class='comment'>// <a href='qty.common.unit.html' title='5.4.4.5.5&emsp;Common'>[qty.<span class='shy'></span>common.<span class='shy'></span>unit]</a>, common</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____'><span class='tcode_in_codeblock'>Unit</span></span></a> U1, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____'><span class='tcode_in_codeblock'>Unit</span></span></a> U2, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______'><span class='tcode_in_codeblock'>Unit</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> common_unit;
<span class='comment'>// <a href='qty.derived.unit.html' title='5.4.4.5.6&emsp;Derived'>[qty.<span class='shy'></span>derived.<span class='shy'></span>unit]</a>, derived</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant__'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_unit;
<span class='comment'>// <a href='qty.unit.one.html' title='5.4.4.5.7&emsp;One'>[qty.<span class='shy'></span>unit.<span class='shy'></span>one]</a>, one</span>
<span class='keyword'>struct</span> one;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> one <span id='lib:one'><a class='hidden_link' href='qty.unit.one.html#lib:one' title='5.4.4.5.7&emsp;One&emsp;[qty.unit.one]'>one</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// named derived units of a quantity of dimension one</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:percent'><a class='hidden_link' href='#lib:percent' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>percent</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> named_unit<span class='anglebracket'>&lt;</span><span class='literal'>"%"</span>, mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>100</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:percent_'><a class='hidden_link' href='#lib:percent' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>percent</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:per_mille'><a class='hidden_link' href='#lib:per_mille' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>per_mille</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
named_unit<span class='anglebracket'>&lt;</span>symbol_text<span class='curlybracket'>{</span><span class='literal'>u8"\u2030"</span> <span class='comment'>/* <span class='tcode_in_codeblock'><span class='ucode'>U+2030</span> <span class='uname'>PER MILLE SIGN</span></span> */</span>, <span class='literal'>"%o"</span><span class='curlybracket'>}</span>,
mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>1000</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:per_mille_'><a class='hidden_link' href='#lib:per_mille' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>per_mille</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> <span id='lib:parts_per_million'><a class='hidden_link' href='#lib:parts_per_million' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>parts_per_million</a></span> <span class='keyword'>final</span> <span class='operator'>:</span>
named_unit<span class='anglebracket'>&lt;</span><span class='literal'>"ppm"</span>, mag_ratio<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>1'000'000</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> one<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>}</span> <span id='lib:parts_per_million_'><a class='hidden_link' href='#lib:parts_per_million' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>parts_per_million</a></span>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span id='lib:ppm'><a class='hidden_link' href='#lib:ppm' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>ppm</a></span> <span class='operator'>=</span> parts_per_million;
<span class='comment'>// <a href='qty.unit.ops.html' title='5.4.4.6&emsp;Operations'>[qty.<span class='shy'></span>unit.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>U u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> square<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> cubic<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.unit.cmp.html' title='5.4.4.7&emsp;Comparison'>[qty.<span class='shy'></span>unit.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________________'><span class='tcode_in_codeblock'>Unit</span></span></a> From, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________________'><span class='tcode_in_codeblock'>Unit</span></span></a> To<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>From from, To to<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.unit.obs.html' title='5.4.4.8&emsp;Observers'>[qty.<span class='shy'></span>unit.<span class='shy'></span>obs]</a>, observers</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_quantity_spec<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit__'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_unit<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit___'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_common_unit<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> us<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.unit.sym.fmt.html' title='5.4.4.10&emsp;Symbol formatting'>[qty.<span class='shy'></span>unit.<span class='shy'></span>sym.<span class='shy'></span>fmt]</a>, symbol formatting</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:unit_symbol_solidus'><a class='hidden_link' href='#lib:unit_symbol_solidus' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_solidus</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span>
one_denominator,
always,
never,
default_denominator <span class='operator'>=</span> one_denominator
<span class='curlybracket'>}</span>;
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:unit_symbol_separator'><a class='hidden_link' href='#lib:unit_symbol_separator' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_separator</a></span> <span class='operator'>:</span> std<span class='operator'>::</span>int8_t <span class='curlybracket'>{</span>
space,
half_high_dot,
default_separator <span class='operator'>=</span> space
<span class='curlybracket'>}</span>;
<span class='keyword'>struct</span> <span id='lib:unit_symbol_formatting'><a class='hidden_link' href='#lib:unit_symbol_formatting' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>unit_symbol_formatting</a></span> <span class='curlybracket'>{</span>
character_set char_set <span class='operator'>=</span> character_set<span class='operator'>::</span>default_character_set;
unit_symbol_solidus solidus <span class='operator'>=</span> unit_symbol_solidus<span class='operator'>::</span>default_denominator;
unit_symbol_separator separator <span class='operator'>=</span> unit_symbol_separator<span class='operator'>::</span>default_separator;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out unit_symbol_to<span class='parenthesis'>(</span>Out out, U u, <span class='keyword'>const</span> unit_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>unit_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view unit_symbol<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.ref.concepts.html' title='5.4.5&emsp;Concepts'>[qty.<span class='shy'></span>ref.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:Reference'><span id='lib:Reference'><span class='tcode_in_codeblock'>Reference</span></span></span></a> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='qty.ref.concepts.html#concept:ReferenceOf' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:ReferenceOf'><span id='lib:ReferenceOf'><span class='tcode_in_codeblock'>ReferenceOf</span></span></span></a> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.ref.syn.html' title='5.4.6&emsp;Class template reference'>[qty.<span class='shy'></span>ref.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>reference</span></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, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> reference;
<span class='comment'>// <a href='qty.ref.ops.html' title='5.4.7&emsp;Operations'>[qty.<span class='shy'></span>ref.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit'></a><i >OffsetUnit</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R r<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='tcode_in_codeblock'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit_'></a><i >OffsetUnit</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</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>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______'><span class='tcode_in_codeblock'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='comment'>// <a href='qty.ref.obs.html' title='5.4.9&emsp;Observers'>[qty.<span class='shy'></span>ref.<span class='shy'></span>obs]</a>, observers</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</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> <span class='keyword'>auto</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> get_unit<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> get_common_reference<span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u1,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit______'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u2,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_______'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference________'><span class='tcode_in_codeblock'>Reference</span></span></a> R1, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_________'><span class='tcode_in_codeblock'>Reference</span></span></a> R2, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__________'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> get_common_reference<span class='parenthesis'>(</span>R1 r1, R2 r2, Rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.rep.html' title='5.5&emsp;Representation'>[qty.<span class='shy'></span>rep]</a>, representation</span>
<span class='keyword'>enum</span> <span class='keyword'>class</span> <span id='lib:quantity_character'><a class='hidden_link' href='#lib:quantity_character' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>quantity_character</a></span> <span class='curlybracket'>{</span> scalar, complex, vector, tensor <span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.rep.traits.html' title='5.5.2&emsp;Traits'>[qty.<span class='shy'></span>rep.<span class='shy'></span>traits]</a>, traits</span>
<span class='comment'>// <a href='qty.fp.traits.html' title='5.5.2.1&emsp;Floating-point'>[qty.<span class='shy'></span>fp.<span class='shy'></span>traits]</a>, floating-point</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'>constexpr</span> <span class='keyword'>bool</span> treat_as_floating_point <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.char.traits.html' title='5.5.2.2&emsp;Quantity character'>[qty.<span class='shy'></span>char.<span class='shy'></span>traits]</a>, quantity character</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_scalar <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:disable_scalar,bool'></a>disable_scalar<span class='anglebracket'>&lt;</span><span class='keyword'>bool</span><span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <a class='index' id='lib:disable_scalar,std::complex'></a>disable_scalar<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>complex<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>=</span> <span class='literal'>true</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_complex <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_vector <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='comment'>// <a href='qty.val.traits.html' title='5.5.2.3&emsp;Values'>[qty.<span class='shy'></span>val.<span class='shy'></span>traits]</a>, values</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> representation_values;
<span class='comment'>// <a href='qty.rep.cpos.html' title='5.5.3&emsp;Customization point objects'>[qty.<span class='shy'></span>rep.<span class='shy'></span>cpos]</a>, customization point objects</span>
<span class='keyword'>inline</span> <span class='keyword'>namespace</span> <i ><span class='texttt'>unspecified</span></i> <span class='curlybracket'>{</span>
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> real <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> imag <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> modulus <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <i ><span class='texttt'>unspecified</span></i> magnitude <span class='operator'>=</span> <i ><span class='texttt'>unspecified</span></i>;
<span class='curlybracket'>}</span>
<span class='comment'>// <a href='qty.rep.concepts.html' title='5.5.4&emsp;Concepts'>[qty.<span class='shy'></span>rep.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Representation <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, quantity_character Ch<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> RepresentationOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.html' title='5.6&emsp;Quantity'>[qty]</a>, quantity</span>
<span class='comment'>// <a href='qty.like.html' title='5.6.2&emsp;Interoperability'>[qty.<span class='shy'></span>like]</a>, interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_like_traits; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityLike <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.syn.html' title='5.6.3&emsp;Class template quantity'>[qty.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>quantity</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> Quantity <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R, <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> quantity;
<span class='comment'>// <a href='qty.delta.html' title='5.6.14&emsp;Construction helper delta'>[qty.<span class='shy'></span>delta]</a>, construction helper <span class='tcode_in_codeblock'>delta</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> delta_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> delta_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:delta'><a class='hidden_link' href='#lib:delta' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>delta</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.non.mem.conv.html' title='5.6.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>, non-member conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span><i ><span class='texttt'>see below</span></i>, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> 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> ToQ, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</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> <span class='keyword'>auto</span> ToQS, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> quantity_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> q<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='comment'>// <a href='qty.common.type.html' title='5.6.16&emsp;std&#x200b;::&#x200b;common_&shy;type specializations'>[qty.<span class='shy'></span>common.<span class='shy'></span>type]</a>, <span class='tcode_in_codeblock'>std&#x200b;::&#x200b;common_<span class='shy'></span>type</span> specializations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q1, mp_units<span class='operator'>::</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> Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q1, Q2<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>struct</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span>; <span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Value, Q<span class='anglebracket'>&gt;</span> <span class='operator'>:</span> std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.pt.html' title='5.7&emsp;Quantity point'>[qty.<span class='shy'></span>pt]</a>, quantity point</span>
<span class='comment'>// <a href='qty.pt.orig.html' title='5.7.2&emsp;Point origin'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, point origin</span>
<span class='comment'>// <a href='qty.pt.orig.concepts.html' title='5.7.2.2&emsp;Concepts'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig.<span class='shy'></span>concepts]</a>, concepts</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PointOrigin <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> PointOriginFor <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.orig.types.html' title='5.7.2.3&emsp;Types'>[qty.<span class='shy'></span>pt.<span class='shy'></span>orig.<span class='shy'></span>types]</a>, types</span>
<span class='comment'>// <a href='qty.abs.pt.orig.html' title='5.7.2.3.1&emsp;Absolute'>[qty.<span class='shy'></span>abs.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, absolute</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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> absolute_point_origin;
<span class='comment'>// <a href='qty.rel.pt.orig.html' title='5.7.2.3.2&emsp;Relative'>[qty.<span class='shy'></span>rel.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, relative</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> relative_point_origin;
<span class='comment'>// <a href='qty.zeroth.pt.orig.html' title='5.7.2.3.3&emsp;Zeroth'>[qty.<span class='shy'></span>zeroth.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, zeroth</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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> zeroth_point_origin_;
<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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> zeroth_point_origin_<span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span> <span id='lib:zeroth_point_origin'><a class='hidden_link' href='#lib:zeroth_point_origin' title='5.2.2&emsp;Module mp_&shy;units.core synopsis&emsp;[mp.units.core.syn]'>zeroth_point_origin</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.def.pt.orig.html' title='5.7.2.5.2&emsp;Default'>[qty.<span class='shy'></span>def.<span class='shy'></span>pt.<span class='shy'></span>orig]</a>, default</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.pt.like.html' title='5.7.3&emsp;Interoperability'>[qty.<span class='shy'></span>pt.<span class='shy'></span>like]</a>, interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_point_like_traits; <span class='comment'>// <i >not defined</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPointLike <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.syn.html' title='5.7.4&emsp;Class template quantity_&shy;point'>[qty.<span class='shy'></span>pt.<span class='shy'></span>syn]</a>, class template <span class='tcode_in_codeblock'>quantity_<span class='shy'></span>point</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPoint <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> QuantityPointOf <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference________________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R,
<a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor_'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> PO <span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> quantity_point;
<span class='comment'>// <a href='qty.point.html' title='5.7.14&emsp;Construction helper point'>[qty.<span class='shy'></span>point]</a>, construction helper <span class='tcode_in_codeblock'>point</span></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_________________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> point_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__________________'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> point_<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span id='lib:point'><a class='hidden_link' href='qty.point.html#lib:point' title='5.7.14&emsp;Construction helper point&emsp;[qty.point]'>point</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='comment'>// <a href='qty.pt.non.mem.conv.html' title='5.7.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>, non-member conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span><i ><span class='texttt'>see below</span></i>, <i ><span class='texttt'>see below</span></i>, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation______'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_______'><span class='tcode_in_codeblock'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________________________________'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<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> ToQ, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</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> ToQP, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</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> <span class='keyword'>auto</span> ToQS, <i ><span class='texttt'>see below</span></i><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> quantity_cast<span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i> qp<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></span></div></div><div id='mp.units.systems.syn' class='section'><h3 ><a class='secnum' href='#mp.units.systems.syn' style='min-width:80pt'>5.2.3</a> Module <span class='texttt'>mp_<span class='shy'></span>units.systems</span> synopsis <a class='abbr_ref' href='mp.units.systems.syn.html'>[mp.units.systems.syn]</a></h3><div class='texpara'><span id='module:mp_units.systems'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units.systems'>🔗</a></div><span class='codeblock'><span class='keyword'>export</span> <span class='keyword'>module</span> mp_units<span class='operator'>.</span>systems;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>import</span> std;
<span class='keyword'>export</span> <span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.chrono.html' title='5.9&emsp;std&#x200b;::&#x200b;chrono interoperability'>[qty.<span class='shy'></span>chrono]</a>, <span class='tcode_in_codeblock'>std&#x200b;::&#x200b;chrono</span> interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_like_traits<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> chrono_point_origin_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> chrono_point_origin_<span class='anglebracket'>&lt;</span>Clock<span class='anglebracket'>&gt;</span> <span id='lib:chrono_point_origin'><a class='hidden_link' href='#lib:chrono_point_origin' title='5.2.3&emsp;Module mp_&shy;units.systems synopsis&emsp;[mp.units.systems.syn]'>chrono_point_origin</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock, <span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>time_point<span class='anglebracket'>&lt;</span>Clock, std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></span></div></div></div></body></html>

View File

@ -1,23 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[mp.units.systems.syn]</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.2</a> mp-units module synopses <a class='abbr_ref' href='mp.units.syns.html#mp.units.systems.syn'>[mp.units.syns]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.2.3</a> Module <span class='texttt'>mp_<span class='shy'></span>units.systems</span> synopsis <a class='abbr_ref'>[mp.units.systems.syn]</a></h3><div class='texpara'><span id='module:mp_units.systems'><div class='marginalizedparent'><a class='itemDeclLink' href='#module:mp_units.systems'>🔗</a></div><span class='codeblock'><span class='keyword'>export</span> <span class='keyword'>module</span> mp_units<span class='operator'>.</span>systems;
<span class='keyword'>export</span> <span class='keyword'>import</span> mp_units<span class='operator'>.</span>core;
<span class='keyword'>import</span> std;
<span class='keyword'>export</span> <span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.chrono.html' title='5.9&emsp;std&#x200b;::&#x200b;chrono interoperability'>[qty.<span class='shy'></span>chrono]</a>, <span class='tcode_in_codeblock'>std&#x200b;::&#x200b;chrono</span> interoperability</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_like_traits<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> chrono_point_origin_;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> chrono_point_origin_<span class='anglebracket'>&lt;</span>Clock<span class='anglebracket'>&gt;</span> <span id='lib:chrono_point_origin'><a class='hidden_link' href='#lib:chrono_point_origin' title='5.2.3&emsp;Module mp_&shy;units.systems synopsis&emsp;[mp.units.systems.syn]'>chrono_point_origin</a></span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock, <span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>time_point<span class='anglebracket'>&lt;</span>Clock, std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></span></div></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
div.example { display: none; }
div.note { display: none; }
a.footnotenum { display: none; }
div.footnote { display: none; }
div.footnoteSeparator { display: none; }
.footnoteref { display: none; }
div.nonNormativeOnly { display: none; }

View File

@ -1,10 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.abs.pt.orig]</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#qty.abs.pt.orig'>[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#qty.abs.pt.orig'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.3</a> Types <a class='abbr_ref' href='qty.pt.orig.types.html#qty.abs.pt.orig'>[qty.pt.orig.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.7.2.3.1</a> Absolute <a class='abbr_ref'>[qty.abs.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:absolute_point_origin'><a class='hidden_link' href='#lib:absolute_point_origin' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'>absolute_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> QS; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5491'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>An <a class='hidden_link' href='#def:origin,absolute' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'><span id='def:origin,absolute'><i >absolute origin</i></span></a> is an origin
chosen by convention and not defined in terms of another origin<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>A specialization of <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining an absolute origin<a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='1.sentence-3' class='sentence'><span class='texttt'>QS</span> is the quantity the origin represents<a class='hidden_link' href='#1.sentence-3'>.</a></div></div></div></div></body></html>

View File

@ -1,74 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.arith.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.6</a> Quantity <a class='abbr_ref' href='qty.html#arith.ops'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.11</a> Arithmetic operations <a class='abbr_ref'>[qty.arith.ops]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4983'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator%'><div id='lib:operator%,quantity'><div id='lib:quantity,operator-'><div id='lib:operator-,quantity'><div id='lib:quantity,operator+'><div id='lib:operator+,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities_'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:CommonlyInvocableQuantities__'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5004'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Let <i >F</i> be the first argument to <a class='index' id='conceptref:CommonlyInvocableQuantities___'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5007'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5011'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>using</span> ret <span class='operator'>=</span> <i >common-quantity-for</i><span class='anglebracket'>&lt;</span><i >F</i>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>const</span> ret ret_lhs<span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>;
<span class='keyword'>const</span> ret ret_rhs<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span>;
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>
ret_lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ret<span class='operator'>::</span>unit<span class='parenthesis'>)</span> @ ret_rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ret<span class='operator'>::</span>unit<span class='parenthesis'>)</span>,
ret<span class='operator'>::</span>reference<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:quantity,operator-_'><div id='lib:operator-,quantity_'><div id='lib:quantity,operator+_'><div id='lib:operator+,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf__'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5043'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> lhs @ <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span>rhs<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:quantity,operator-__'><div id='lib:operator-,quantity__'><div id='lib:quantity,operator+__'><div id='lib:operator+,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf___'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf____'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_____'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5068'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span>lhs<span class='curlybracket'>}</span> @ rhs;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator/'><div id='lib:operator/,quantity'><div id='lib:quantity,operator*'><div id='lib:operator*,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities'></a><span class='texttt'><i >InvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities_'></a><span class='texttt'><i >InvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5086'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#7.sentence-1'>.</a></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5090'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>
lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>rhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span>, R @ R2<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:quantity,operator*_'><div id='lib:operator*,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf______'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_______'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5113'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>rhs <span class='operator'>!</span><span class='operator'>=</span> representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#9.sentence-1'>.</a></div></div></div></div><div class='para' id='10'><div class='marginalizedparent'><a class='marginalized' href='#10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5117'>#</a></div><div class='texpara'><div id='10.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs, R<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:quantity,operator*__'><div id='lib:operator*,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='11'><div class='marginalizedparent'><a class='marginalized' href='#11'>11</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5139'>#</a></div><div class='texpara'><div id='11.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#11.sentence-1'>.</a></div></div></div></div><div class='para' id='12'><div class='marginalizedparent'><a class='marginalized' href='#12'>12</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5143'>#</a></div><div class='texpara'><div id='12.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>lhs @ rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>, <span class='operator'>::</span>mp_units<span class='operator'>::</span>one @ R<span class='curlybracket'>}</span>;
</span></div></div></div></div></div></body></html>

View File

@ -1,43 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.assign.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.6</a> Quantity <a class='abbr_ref' href='qty.html#assign.ops'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.10</a> Compound assignment operations <a class='abbr_ref'>[qty.assign.ops]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4862'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator%='><div id='lib:operator%=,quantity'><div id='lib:quantity,operator-='><div id='lib:operator-=,quantity'><div id='lib:quantity,operator+='><div id='lib:operator+=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable__'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>%</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4882'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span><span class='operator'>=</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4886'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>lhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span> @ rhs<span class='operator'>.</span>in<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4891'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span></span><a class='hidden_link' href='#4.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4895'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Remarks</i>: Let <i >C</i> be
<ul class='itemize'><li id='5.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#5.1'>(5.1)</a></div><span class='texttt'><span class='parenthesis'>(</span><span class='operator'>!</span>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span></span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span><span class='operator'>=</span></span>, and</li><li id='5.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#5.2'>(5.2)</a></div><span class='texttt'><span class='literal'>true</span></span> otherwise<a class='hidden_link' href='#5.sentence-1'>.</a></li></ul></div> <div id='5.sentence-2' class='sentence'>
The expression in the <span class='textsf'><i >requires-clause</i></span> is equivalent to:
<span class='codeblock'><a class='index' id='conceptref:QuantityConvertibleTo'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Rep2 b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4912'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Recommended practice</i>: If <span class='texttt'>equivalent<span class='parenthesis'>(</span>unit, get_<span class='shy'></span>unit<span class='parenthesis'>(</span>rhs<span class='operator'>.</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span>,
then the expression <span class='texttt'>rhs<span class='operator'>.</span>in<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span></span> is replaced with <span class='texttt'>rhs</span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,operator/='><div id='lib:operator/=,quantity'><div id='lib:quantity,operator*='><div id='lib:operator*=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable___'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable____'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo_'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4930'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span><span class='operator'>=</span></span>, then <span class='texttt'>rhs <span class='operator'>!</span><span class='operator'>=</span> representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#7.sentence-1'>.</a></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4934'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>lhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span> @ rhs</span><a class='hidden_link' href='#8.sentence-1'>.</a></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4939'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span></span><a class='hidden_link' href='#9.sentence-1'>.</a></div></div></div></div><div class='para' id='10'><div class='marginalizedparent'><a class='marginalized' href='#10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4943'>#</a></div><div class='texpara'><div id='10.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'><span class='parenthesis'>(</span><span class='operator'>!</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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Value b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</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:quantity,operator*=_'><div id='lib:operator*=,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*=,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_____'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable______'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='11'><div class='marginalizedparent'><a class='marginalized' href='#11'>11</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4965'>#</a></div><div class='texpara'><div id='11.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div><div class='para' id='12'><div class='marginalizedparent'><a class='marginalized' href='#12'>12</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4970'>#</a></div><div class='texpara'><div id='12.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'><span class='parenthesis'>(</span>Q2<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:ValuePreservingTo__'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Q2<span class='operator'>::</span>rep b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,11 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.canon.unit]</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#qty.canon.unit'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.4</a> Unit <a class='abbr_ref' href='qty.unit.html#qty.canon.unit'>[qty.unit]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.4.5</a> Types <a class='abbr_ref' href='qty.unit.types.html#qty.canon.unit'>[qty.unit.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.4.5.1</a> Canonical <a class='abbr_ref'>[qty.canon.unit]</a></h4><div class='texpara'><span id='lib:canonical-unit'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:canonical-unit'>🔗</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.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> M, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <i >canonical-unit</i> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
M mag;
U reference_unit;
<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2597'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'><i >canonical-unit</i></span> represents a unit expressed in terms of base units (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-18">IEC 60050, 112-01-18</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#note-1'>1</a></i>:&ensp;<div id='1.sentence-2' class='sentence'>Other types representing units are equal only if they have the same type<a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='1.sentence-3' class='sentence'><span class='texttt'><i >canonical-unit</i></span> is used to implement binary relations other than equality<a class='hidden_link' href='#1.sentence-3'>.</a></div>&nbsp;<i>end note</i>]</div></div> <div id='1.sentence-4' class='sentence'><span class='texttt'>reference_<span class='shy'></span>unit</span> is simplified (<a href='qty.sym.expr.algos.html' title='5.3.4.4&emsp;Algorithms'>[qty.<span class='shy'></span>sym.<span class='shy'></span>expr.<span class='shy'></span>algos]</a>)<a class='hidden_link' href='#1.sentence-4'>.</a></div></div></div><div class='texpara'><div id='lib:get-canonical-unit,Unit'><div id='lib:Unit,get-canonical-unit'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Unit,get-canonical-unit'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='texttt'><i >get-canonical-unit</i></span><span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> u<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2611'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: The instantiation of <span class='texttt'><i >canonical-unit</i></span> for <span class='texttt'>u</span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,12 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.char.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.char.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.char.traits'>[qty.rep.traits]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.2.2</a> Quantity character <a class='abbr_ref'>[qty.char.traits]</a></h4><div class='texpara'><div id='lib:disable_vector'><div id='lib:disable_complex'><div id='lib:disable_scalar'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:disable_scalar'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_scalar <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_complex <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_vector <span class='operator'>=</span> <span class='literal'>false</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3736'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Some quantities are defined as having a numerical value (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>) of a specific set (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-01-02">IEC 60050, 102-01-02</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>The representation concepts use these traits
to help determine the sets <span class='texttt'>T</span> represents<a class='hidden_link' href='#1.sentence-2'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3741'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize these templates
for cv-unqualified program-defined types<a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#2.sentence-2'>.</a></div></div></div></div><div class='para nonNormativeOnly' 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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3749'>#</a></div><div class='texpara'><div id='note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#note-1'>1</a></i>:&ensp;<div id='3.sentence-1' class='sentence'>These templates prevent use of representation types with the library
that satisfy but do not in fact model their corresponding concept<a class='hidden_link' href='#3.sentence-1'>.</a></div>&nbsp;<i>end note</i>]</div></div></div></div></div></div></body></html>

View File

@ -1,78 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.chrono]</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.9</a> <span class='texttt'>std&#x200b;::&#x200b;chrono</span> interoperability <a class='abbr_ref'>[qty.chrono]</a></h2><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> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>auto</span> <i >time-unit-from-chrono-period</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>using</span> <span class='keyword'>namespace</span> si;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>nanoseconds<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> nano<span class='anglebracket'>&lt;</span>second<span class='anglebracket'>&gt;</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>microseconds<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> micro<span class='anglebracket'>&lt;</span>second<span class='anglebracket'>&gt;</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>milliseconds<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> milli<span class='anglebracket'>&lt;</span>second<span class='anglebracket'>&gt;</span>;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>seconds<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> second;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>minutes<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> minute;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>hours<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> hour;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>days<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> day;
<span class='keyword'>else</span> <span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>is_same_v<span class='anglebracket'>&lt;</span>Period, std<span class='operator'>::</span>chrono<span class='operator'>::</span>weeks<span class='operator'>::</span>period<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> mag<span class='anglebracket'>&lt;</span><span class='literal'>7</span><span class='anglebracket'>&gt;</span> <span class='operator'>*</span> day;
<span class='keyword'>else</span>
<span class='keyword'>return</span> mag_ratio<span class='anglebracket'>&lt;</span>Period<span class='operator'>::</span>num, Period<span class='operator'>::</span>den<span class='anglebracket'>&gt;</span> <span class='operator'>*</span> second;
<span class='curlybracket'>}</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <a class='index' id='lib:quantity_like_traits,std::chrono::duration'></a>quantity_like_traits<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> reference <span class='operator'>=</span> <i >time-unit-from-chrono-period</i><span class='anglebracket'>&lt;</span>Period<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> explicit_import <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> explicit_export <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>using</span> rep <span class='operator'>=</span> Rep;
<span class='keyword'>using</span> <i >T</i> <span class='operator'>=</span> std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> rep to_numerical_value<span class='parenthesis'>(</span><span class='keyword'>const</span> <i >T</i><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> q<span class='operator'>.</span>count<span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <i >T</i> from_numerical_value<span class='parenthesis'>(</span><span class='keyword'>const</span> rep<span class='operator'>&amp;</span> v<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> <i >T</i><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:chrono_point_origin_'><a class='hidden_link' href='#lib:chrono_point_origin_' title='5.9&emsp;std&#x200b;::&#x200b;chrono interoperability&emsp;[qty.chrono]'>chrono_point_origin_</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> absolute_point_origin<span class='anglebracket'>&lt;</span>isq<span class='operator'>::</span>time<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> clock <span class='operator'>=</span> Clock;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Clock, <span class='keyword'>typename</span> Rep, <span class='keyword'>typename</span> Period<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <a class='index' id='lib:quantity_point_like_traits,std::chrono::time_point'></a>quantity_point_like_traits<span class='anglebracket'>&lt;</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>time_point<span class='anglebracket'>&lt;</span>Clock, std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> reference <span class='operator'>=</span> <i >time-unit-from-chrono-period</i><span class='anglebracket'>&lt;</span>Period<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> point_origin <span class='operator'>=</span> chrono_point_origin<span class='anglebracket'>&lt;</span>Clock<span class='anglebracket'>&gt;</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> explicit_import <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> explicit_export <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>using</span> rep <span class='operator'>=</span> Rep;
<span class='keyword'>using</span> <i >T</i> <span class='operator'>=</span> std<span class='operator'>::</span>chrono<span class='operator'>::</span>time_point<span class='anglebracket'>&lt;</span>Clock, std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> rep to_numerical_value<span class='parenthesis'>(</span><span class='keyword'>const</span> <i >T</i><span class='operator'>&amp;</span> tp<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> tp<span class='operator'>.</span>time_since_epoch<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='operator'>.</span>count<span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <i >T</i> from_numerical_value<span class='parenthesis'>(</span><span class='keyword'>const</span> rep<span class='operator'>&amp;</span> v<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> <i >T</i><span class='parenthesis'>(</span>std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span>Rep, Period<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div></div></body></html>

View File

@ -1,29 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.cmp]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#cmp'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.12</a> Comparison <a class='abbr_ref'>[qty.cmp]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5153'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator<=>'><div id='lib:operator<=>,quantity'><div id='lib:quantity,operator=='><div id='lib:operator==,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5169'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5174'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>using</span> ct <span class='operator'>=</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>const</span> ct ct_lhs<span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>;
<span class='keyword'>const</span> ct ct_rhs<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span>;
<span class='keyword'>return</span> ct_lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ct<span class='operator'>::</span>unit<span class='parenthesis'>)</span> @ ct_rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ct<span class='operator'>::</span>unit<span class='parenthesis'>)</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5184'>#</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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator<=>_'><div id='lib:operator<=>,quantity_'><div id='lib:quantity,operator==_'><div id='lib:operator==,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> Value<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a> Value<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5206'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'>Let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#5.sentence-1'>.</a></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5211'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>lhs<span class='operator'>.</span>numerical_<span class='shy'></span>value_<span class='shy'></span>ref_<span class='shy'></span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs</span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5215'>#</a></div><div class='texpara'><div id='7.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'><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i><span class='anglebracket'>&lt;</span>Rep, Value<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,21 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.common.type]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#common.type'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.16</a> <span class='texttt'>std&#x200b;::&#x200b;common_<span class='shy'></span>type</span> specializations <a class='abbr_ref'>[qty.common.type]</a></h3><div class='texpara'><span class='codeblock'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q1, mp_units<span class='operator'>::</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> Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> mp_units<span class='operator'>::</span>get_common_reference<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> mp_units<span class='operator'>::</span>Reference;
<span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>,
mp_units<span class='operator'>::</span>get_common_quantity_spec<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>quantity_spec,
Q2<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q1, Q2<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> type <span class='operator'>=</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</span>get_common_reference<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='parenthesis'>)</span>,
std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</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> Q, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Value<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity_'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> type <span class='operator'>=</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Value<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</span></div></div></body></html>

View File

@ -1,40 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.common.unit]</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#qty.common.unit'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.4</a> Unit <a class='abbr_ref' href='qty.unit.html#qty.common.unit'>[qty.unit]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.4.5</a> Types <a class='abbr_ref' href='qty.unit.types.html#qty.common.unit'>[qty.unit.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.4.5.5</a> Common <a class='abbr_ref'>[qty.common.unit]</a></h4><div class='texpara'><span id='lib:common_unit'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:common_unit'>🔗</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.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> U1, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='tcode_in_codeblock'>Unit</span></span></a> U2, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='tcode_in_codeblock'>Unit</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> common_unit <span class='keyword'>final</span> <span class='operator'>:</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><i >get-common-scaled-unit</i><span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rest<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><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> common_unit; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <i >common-unit</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<i >get-common-scaled-unit</i><span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rest<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2811'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>common_<span class='shy'></span>unit</span> is used by the library
to encapsulate a conversion factor between units (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-33">IEC 60050, 112-01-33</a>)
common to the operands of quantity addition<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<div id='1.sentence-2' class='sentence'>The result of <span class='texttt'><span class='literal'>1</span> <span class='operator'>*</span> km <span class='operator'>+</span> <span class='literal'>1</span> <span class='operator'>*</span> mi</span>
has a common unit <span class="mjx-chtml"><span class="mjx-math"><span class="mjx-mrow" aria-hidden="true"><span class="mjx-mo"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.446em; padding-bottom: 0.593em;">[</span></span><span class="mjx-mn"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.372em; padding-bottom: 0.372em;">8</span></span><span class="mjx-texatom"><span class="mjx-mrow"><span class="mjx-mo"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.446em; padding-bottom: 0.593em;">/</span></span></span></span><span class="mjx-mn"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.372em; padding-bottom: 0.372em;">125</span></span><span class="mjx-mo"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.446em; padding-bottom: 0.593em;">]</span></span><span class="mjx-texatom"><span class="mjx-mrow"><span class="mjx-mtext"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.151em; padding-bottom: 0.372em;"> m</span></span></span></span></span></span></span>
encapsulated by <span class='texttt'>common_<span class='shy'></span>unit<span class='anglebracket'>&lt;</span>mi, km<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#1.sentence-2'>.</a></div>&nbsp;<i>end example</i>]</div></div> <div id='1.sentence-3' class='sentence'>
A program that instantiates a specialization of <span class='texttt'>common_<span class='shy'></span>unit</span>
that is not a possible result of the library specifications
is ill-formed, no diagnostic required<a class='hidden_link' href='#1.sentence-3'>.</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'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___'><span class='texttt'>Unit</span></span></a> U1, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____'><span class='texttt'>Unit</span></span></a> U2, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____'><span class='texttt'>Unit</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> <span class='texttt'><i >get-common-scaled-unit</i></span><span class='parenthesis'>(</span>U1, U2, Rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span> <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2831'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>constexpr</span> <span class='keyword'>auto</span> res <span class='operator'>=</span> <span class='squarebracket'>[</span><span class='squarebracket'>]</span> <span class='curlybracket'>{</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> canonical_lhs <span class='operator'>=</span> <i >get-canonical-unit</i><span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> canonical_rhs <span class='operator'>=</span> <i >get-canonical-unit</i><span class='parenthesis'>(</span>U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> common_mag <span class='operator'>=</span> <i >common-magnitude</i><span class='parenthesis'>(</span>canonical_lhs<span class='operator'>.</span>mag, canonical_rhs<span class='operator'>.</span>mag<span class='parenthesis'>)</span>;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>common_mag <span class='operator'>=</span><span class='operator'>=</span> mag<span class='anglebracket'>&lt;</span><span class='literal'>1</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> canonical_lhs<span class='operator'>.</span>reference_unit;
<span class='keyword'>else</span>
<span class='keyword'>return</span> scaled_unit<span class='anglebracket'>&lt;</span>common_mag, <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>canonical_lhs<span class='operator'>.</span>reference_unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> res;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <i >get-common-scaled-unit</i><span class='parenthesis'>(</span>res, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2850'>#</a></div><div class='texpara'><div id='3.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'><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='keyword'>sizeof</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>(</span>Rest<span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>0</span> <span class='operator'>|</span><span class='operator'>|</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<i >get-common-scaled-unit</i><span class='parenthesis'>(</span><i >get-common-scaled-unit</i><span class='parenthesis'>(</span>u1, u2<span class='parenthesis'>)</span>, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,27 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.cons]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#cons'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.5</a> Constructors and assignment <a class='abbr_ref'>[qty.cons]</a></h3><div class='texpara'><div id='lib:quantity,constructor'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:SameValueAs'></a><span class='texttt'><i >SameValueAs</i></span><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4517'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >numerical-value</i></span> with <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='texttt'>Reference</span></span></a> R2, <span class='keyword'>typename</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:SameValueAs_'></a><span class='texttt'><i >SameValueAs</i></span><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, Value, Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:QuantityConvertibleTo'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4531'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>quantity<span class='parenthesis'>(</span>quantity<span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span>, R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:QuantityConvertibleTo_'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4544'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to <span class='texttt'><span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span></span> (<a href='qty.non.mem.conv.html' title='5.6.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>)<a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.like.html#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike'><span class='texttt'>QuantityLike</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo__'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >quantity-like-type</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4557'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>quantity<span class='parenthesis'>(</span><span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>,
quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference<span class='curlybracket'>}</span><span class='parenthesis'>)</span>
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4565'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Remarks</i>: The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator='><div id='lib:operator=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo_'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4582'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to <span class='texttt'><span class='texttt'><i >numerical-value</i></span> <span class='operator'>=</span> std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span></span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4586'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span><a class='hidden_link' href='#7.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,29 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.conv]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#conv'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.6</a> Conversions <a class='abbr_ref'>[qty.conv]</a></h3><div class='texpara'><div id='lib:quantity,in'><div id='lib:in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4601'>#</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='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_<span class='shy'></span>spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,in_'><div id='lib:in,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo_'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4615'>#</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> quantity<span class='anglebracket'>&lt;</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,in__'><div id='lib:in,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo__'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity,
quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4631'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in'><div id='lib:force_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4647'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in_'><div id='lib:force_in,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4661'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in__'><div id='lib:force_in,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith___'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4676'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div></div></body></html>

View File

@ -1,17 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.conv.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.6</a> Quantity <a class='abbr_ref' href='qty.html#conv.ops'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.8</a> Conversion operations <a class='abbr_ref'>[qty.conv.ops]</a></h3><div class='texpara'><div id='lib:quantity,operator_constructible_from<Rep>'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,operator_constructible_from%3cRep%3e'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> V_, std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>V_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>explicit</span> <span class='keyword'>operator</span> V_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4738'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >numerical-value</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,operator_QuantityLike'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,operator_QuantityLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q_, <a href='qty.like.html#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike'><span class='texttt'>QuantityLike</span></span></a> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, <span class='texttt'><i >quantity-like-type</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> Q_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4751'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>
numerical_value_in<span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4759'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Remarks</i>: The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>Rep, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div> <div id='3.sentence-2' class='sentence'>
The exception specification is equivalent to:
<span class='codeblock'><span class='keyword'>noexcept</span><span class='parenthesis'>(</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span><i >numerical-value</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,8 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.def.pt.orig]</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#qty.def.pt.orig'>[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#qty.def.pt.orig'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.5</a> Utilities <a class='abbr_ref' href='qty.pt.orig.utils.html#qty.def.pt.orig'>[qty.pt.orig.utils]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.7.2.5.2</a> Default <a class='abbr_ref'>[qty.def.pt.orig]</a></h4><div class='texpara'><div id='lib:default_point_origin,Reference'><div id='lib:Reference,default_point_origin'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Reference,default_point_origin'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5705'>#</a></div><div class='texpara'><div id='1.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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> zeroth_point_origin<span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
</span></div></div></div></div></div></body></html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.delta]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#delta'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.14</a> Construction helper <span class='texttt'>delta</span> <a class='abbr_ref'>[qty.delta]</a></h3><div class='texpara'><span id='lib:delta_'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:delta_'>🔗</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.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> delta_ <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:delta_,operator()'><div id='lib:operator(),delta_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator(),delta_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5292'>#</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='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;</span></div></div></div></div></div></body></html>

View File

@ -1,22 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.derived.unit]</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#qty.derived.unit'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.4</a> Unit <a class='abbr_ref' href='qty.unit.html#qty.derived.unit'>[qty.unit]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.4.5</a> Types <a class='abbr_ref' href='qty.unit.types.html#qty.derived.unit'>[qty.unit.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.4.5.6</a> Derived <a class='abbr_ref'>[qty.derived.unit]</a></h4><div class='texpara'><span id='lib:derived_unit'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:derived_unit'>🔗</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><span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <i >derived-unit-impl</i> <span class='operator'>:</span> <span class='comment'>// <i >exposition only</i></span>
<i >unit-interface</i>,
<i >expr-fractions</i><span class='anglebracket'>&lt;</span><span class='keyword'>struct</span> one, Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> <i >base-type</i> <span class='operator'>=</span> <i >derived-unit-impl</i>; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_unit <span class='keyword'>final</span> <span class='operator'>:</span> <i >derived-unit-impl</i><span class='anglebracket'>&lt;</span>Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2879'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>derived_<span class='shy'></span>unit</span> is used by the library
to represent a derived unit (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-19">IEC 60050, 112-01-19</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>using</span> <span class='keyword'>namespace</span> si<span class='operator'>::</span>unit_symbols;
<span class='keyword'>int</span> x <span class='operator'>=</span> m <span class='operator'>*</span> m; <span class='comment'>// error: cannot construct from <span class='tcode_in_codeblock'>derived_<span class='shy'></span>unit&lt;power&lt;si&#x200b;::&#x200b;metre, 2&gt;&gt;</span></span>
<span class='keyword'>int</span> y <span class='operator'>=</span> m <span class='operator'>*</span> s; <span class='comment'>// error: cannot construct from <span class='tcode_in_codeblock'>derived_<span class='shy'></span>unit&lt;si&#x200b;::&#x200b;metre, si&#x200b;::&#x200b;second&gt;</span></span>
<span class='keyword'>int</span> z <span class='operator'>=</span> m <span class='operator'>/</span> s; <span class='comment'>// error: cannot construct from <span class='tcode_in_codeblock'>derived_<span class='shy'></span>unit&lt;si&#x200b;::&#x200b;metre, per&lt;si&#x200b;::&#x200b;second&gt;&gt;</span></span>
</span>&nbsp;<i>end example</i>]</div></div> <div id='1.sentence-2' class='sentence'>
A program that instantiates a specialization of <span class='texttt'>derived_<span class='shy'></span>unit</span>
that is not a possible result of the library specifications
is ill-formed, no diagnostic required<a class='hidden_link' href='#1.sentence-2'>.</a></div></div></div></div></body></html>

View File

@ -1,10 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim.concepts]</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#qty.dim.concepts'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref' href='qty.dim.html#concepts'>[qty.dim]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.2.2</a> Concepts <a class='abbr_ref'>[qty.dim.concepts]</a></h4><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'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='concept:Dimension'><span id='lib:Dimension'><span class='texttt'>Dimension</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:SymbolicConstant'></a><span class='texttt'><i >SymbolicConstant</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >dimension-interface</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >BaseDimension</i></span><a class='index' id='concept:BaseDimension'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='texttt'><i >is-derived-from-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, base_dimension<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:DimensionOf' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='concept:DimensionOf'><span id='lib:DimensionOf'><span class='texttt'>DimensionOf</span></span></span></a> <span class='operator'>=</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>D<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> D<span class='parenthesis'>)</span>;
</code></div></div></div></body></html>

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim.general]</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#qty.dim.general'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref' href='qty.dim.html#general'>[qty.dim]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.2.1</a> General <a class='abbr_ref'>[qty.dim.general]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1344'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Subclause <a href='qty.dim.html' title='5.4.2&emsp;Dimension'>[qty.<span class='shy'></span>dim]</a> specifies the components
for defining the dimension of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-11">IEC 60050, 112-01-11</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,75 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim]</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#qty.dim'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref'>[qty.dim]</a></h3><div id='general' class='section'><h4 ><a class='secnum' href='#general' style='min-width:95pt'>5.4.2.1</a> General <a class='abbr_ref' href='qty.dim.general.html'>[qty.dim.general]</a></h4><div class='para' id='general-1'><div class='marginalizedparent'><a class='marginalized' href='#general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1344'>#</a></div><div class='texpara'><div id='general-1.sentence-1' class='sentence'>Subclause [qty.<span class='shy'></span>dim] specifies the components
for defining the dimension of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-11">IEC 60050, 112-01-11</a>)<a class='hidden_link' href='#general-1.sentence-1'>.</a></div></div></div></div><div id='concepts' class='section'><h4 ><a class='secnum' href='#concepts' style='min-width:95pt'>5.4.2.2</a> Concepts <a class='abbr_ref' href='qty.dim.concepts.html'>[qty.dim.concepts]</a></h4><div class='texpara'><div class='itemdecl' id='concepts-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#concepts-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='concept:Dimension'><span id='lib:Dimension'><span class='texttt'>Dimension</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:SymbolicConstant'></a><span class='texttt'><i >SymbolicConstant</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >dimension-interface</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >BaseDimension</i></span><a class='index' id='concept:BaseDimension'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='texttt'><i >is-derived-from-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, base_dimension<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:DimensionOf' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='concept:DimensionOf'><span id='lib:DimensionOf'><span class='texttt'>DimensionOf</span></span></span></a> <span class='operator'>=</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__'><span class='texttt'>Dimension</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>D<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> D<span class='parenthesis'>)</span>;
</code></div></div></div><div id='types' class='section'><h4 ><a class='secnum' href='#types' style='min-width:95pt'>5.4.2.3</a> Types <a class='abbr_ref' href='qty.dim.types.html'>[qty.dim.types]</a></h4><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>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:base_dimension'><a class='hidden_link' href='#lib:base_dimension' title='5.4.2.3&emsp;Types&emsp;[qty.dim.types]'>base_dimension</a></span> <span class='operator'>:</span> <i >dimension-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <i >symbol</i> <span class='operator'>=</span> Symbol; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='types-1'><div class='marginalizedparent'><a class='marginalized' href='#types-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1375'>#</a></div><div class='texpara'><div id='types-1.sentence-1' class='sentence'><span class='texttt'>base_<span class='shy'></span>dimension</span> is used
to define the dimension of a base quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-08">IEC 60050, 112-01-08</a>)<a class='hidden_link' href='#types-1.sentence-1'>.</a></div> <div id='types-1.sentence-2' class='sentence'><span class='texttt'>Symbol</span> is its symbolic representation<a class='hidden_link' href='#types-1.sentence-2'>.</a></div> <div id='types-example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#types-example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> dim_length <span class='keyword'>final</span> <span class='operator'>:</span> base_dimension<span class='anglebracket'>&lt;</span><span class='literal'>"L"</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span> dim_length;
</span>&nbsp;<i>end example</i>]</div></div></div><div class='texpara'><span id='lib:derived_dimension'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:derived_dimension'>🔗</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><span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <i >derived-dimension-impl</i> <span class='comment'>// <i >exposition only</i></span>
<span class='operator'>:</span> <i >expr-fractions</i><span class='anglebracket'>&lt;</span><span class='keyword'>struct</span> dimension_one, Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant_'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_dimension <span class='keyword'>final</span> <span class='operator'>:</span> <i >dimension-interface</i>, <i >derived-dimension-impl</i><span class='anglebracket'>&lt;</span>Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div></div><div class='para' id='types-2'><div class='marginalizedparent'><a class='marginalized' href='#types-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1399'>#</a></div><div class='texpara'><div id='types-2.sentence-1' class='sentence'><span class='texttt'>derived_<span class='shy'></span>dimension</span> is used by the library
to represent the dimension of a derived quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-10">IEC 60050, 112-01-10</a>)<a class='hidden_link' href='#types-2.sentence-1'>.</a></div> <div id='types-example-2' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#types-example-2'>2</a></i>:&ensp;<span class='codeblock'><span class='keyword'>constexpr</span> <span class='keyword'>auto</span> dim_acceleration <span class='operator'>=</span> isq<span class='operator'>::</span>speed<span class='operator'>.</span>dimension <span class='operator'>/</span> isq<span class='operator'>::</span>dim_time;
<span class='keyword'>int</span> x <span class='operator'>=</span> dim_acceleration; <span class='comment'>// error: cannot construct from</span>
<span class='comment'>// <span class='tcode_in_codeblock'>derived_<span class='shy'></span>dimension&lt;isq&#x200b;::&#x200b;dim_<span class='shy'></span>length, per&lt;power&lt;isq&#x200b;::&#x200b;dim_<span class='shy'></span>time, 2&gt;&gt;&gt;</span></span>
</span>&nbsp;<i>end example</i>]</div></div> <div id='types-2.sentence-2' class='sentence'>
A program that instantiates a specialization of <span class='texttt'>derived_<span class='shy'></span>dimension</span>
that is not a possible result of the library specifications
is ill-formed, no diagnostic required<a class='hidden_link' href='#types-2.sentence-2'>.</a></div></div><div class='texpara'><span id='lib:dimension_one'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_one'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> dimension_one <span class='keyword'>final</span> <span class='operator'>:</span> <i >dimension-interface</i>, <i >derived-dimension-impl</i><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div></div><div class='para' id='types-3'><div class='marginalizedparent'><a class='marginalized' href='#types-3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1422'>#</a></div><div class='texpara'><div id='types-3.sentence-1' class='sentence'><span class='texttt'>dimension_<span class='shy'></span>one</span> represents the dimension of a quantity of dimension one (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-13">IEC 60050, 112-01-13</a>)<a class='hidden_link' href='#types-3.sentence-1'>.</a></div></div></div></div><div id='ops' class='section'><h4 ><a class='secnum' href='#ops' style='min-width:95pt'>5.4.2.4</a> Operations <a class='abbr_ref' href='qty.dim.ops.html'>[qty.dim.ops]</a></h4><div class='texpara'><span id='lib:dimension-interface'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension-interface'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> <i >dimension-interface</i> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__________'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<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>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:Dimension,operator*'><div id='lib:operator*,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____________'><span class='texttt'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-1'><div class='marginalizedparent'><a class='marginalized' href='#ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1452'>#</a></div><div class='texpara'><div id='ops-1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-multiply</i></span><span class='anglebracket'>&lt;</span>derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>Lhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#ops-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,operator/'><div id='lib:operator/,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator/,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______________'><span class='texttt'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-2'><div class='marginalizedparent'><a class='marginalized' href='#ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1464'>#</a></div><div class='texpara'><div id='ops-2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-divide</i></span><span class='anglebracket'>&lt;</span>derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>Lhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#ops-2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,operator=='><div id='lib:operator==,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__________________'><span class='texttt'>Dimension</span></span></a> Rhs<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>Lhs, Rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-3'><div class='marginalizedparent'><a class='marginalized' href='#ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1476'>#</a></div><div class='texpara'><div id='ops-3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>same_<span class='shy'></span>v<span class='anglebracket'>&lt;</span>Lhs, Rhs<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#ops-3.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,inverse'><div id='lib:inverse,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:inverse,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-4'><div class='marginalizedparent'><a class='marginalized' href='#ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1487'>#</a></div><div class='texpara'><div id='ops-4.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>dimension_<span class='shy'></span>one <span class='operator'>/</span> d</span><a class='hidden_link' href='#ops-4.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,pow'><div id='lib:pow,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:pow,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____________________'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>D d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-5'><div class='marginalizedparent'><a class='marginalized' href='#ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1500'>#</a></div><div class='texpara'><div id='ops-5.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-pow</i></span><span class='anglebracket'>&lt;</span>Num, Den, derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#ops-5.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,sqrt'><div id='lib:sqrt,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:sqrt,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-6'><div class='marginalizedparent'><a class='marginalized' href='#ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1511'>#</a></div><div class='texpara'><div id='ops-6.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>pow<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>2</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#ops-6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,cbrt'><div id='lib:cbrt,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:cbrt,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__________________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='ops-7'><div class='marginalizedparent'><a class='marginalized' href='#ops-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1522'>#</a></div><div class='texpara'><div id='ops-7.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>pow<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>3</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#ops-7.sentence-1'>.</a></div></div></div></div></div><div id='sym.fmt' class='section'><h4 ><a class='secnum' href='#sym.fmt' style='min-width:95pt'>5.4.2.5</a> Symbol formatting <a class='abbr_ref' href='qty.dim.sym.fmt.html'>[qty.dim.sym.fmt]</a></h4><div class='texpara'><div id='lib:Dimension,dimension_symbol_to'><div id='lib:dimension_symbol_to,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_symbol_to,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___________________________'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out dimension_symbol_to<span class='parenthesis'>(</span>Out out, D d, <span class='keyword'>const</span> dimension_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='sym.fmt-1'><div class='marginalizedparent'><a class='marginalized' href='#sym.fmt-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1536'>#</a></div><div class='texpara'><div id='sym.fmt-1.sentence-1' class='sentence'><i >Effects</i>: TBD<a class='hidden_link' href='#sym.fmt-1.sentence-1'>.</a></div></div></div></div><div class='para' id='sym.fmt-2'><div class='marginalizedparent'><a class='marginalized' href='#sym.fmt-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1540'>#</a></div><div class='texpara'><div id='sym.fmt-2.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#sym.fmt-2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,dimension_symbol'><div id='lib:dimension_symbol,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_symbol,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>dimension_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____________________________'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view dimension_symbol<span class='parenthesis'>(</span>D<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='sym.fmt-3'><div class='marginalizedparent'><a class='marginalized' href='#sym.fmt-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1552'>#</a></div><div class='texpara'><div id='sym.fmt-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>TBD<span class='operator'>.</span>
</span></div></div></div></div></div></div></body></html>

View File

@ -1,27 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim.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.4</a> Reference <a class='abbr_ref' href='qty.ref.html#qty.dim.ops'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref' href='qty.dim.html#ops'>[qty.dim]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.2.4</a> Operations <a class='abbr_ref'>[qty.dim.ops]</a></h4><div class='texpara'><span id='lib:dimension-interface'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension-interface'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> <i >dimension-interface</i> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______'><span class='tcode_in_codeblock'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______'><span class='tcode_in_codeblock'>Dimension</span></span></a> Rhs<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>Lhs, Rhs<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:Dimension,operator*'><div id='lib:operator*,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________'><span class='texttt'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1452'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-multiply</i></span><span class='anglebracket'>&lt;</span>derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>Lhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,operator/'><div id='lib:operator/,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator/,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____________'><span class='texttt'>Dimension</span></span></a> Rhs<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>Lhs, Rhs<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1464'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-divide</i></span><span class='anglebracket'>&lt;</span>derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>Lhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rhs<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,operator=='><div id='lib:operator==,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______________'><span class='texttt'>Dimension</span></span></a> Lhs, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______________'><span class='texttt'>Dimension</span></span></a> Rhs<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>Lhs, Rhs<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1476'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>same_<span class='shy'></span>v<span class='anglebracket'>&lt;</span>Lhs, Rhs<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,inverse'><div id='lib:inverse,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:inverse,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1487'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>dimension_<span class='shy'></span>one <span class='operator'>/</span> d</span><a class='hidden_link' href='#4.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,pow'><div id='lib:pow,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:pow,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension__________________'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension___________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>D d<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1500'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='texttt'><i >expr-pow</i></span><span class='anglebracket'>&lt;</span>Num, Den, derived_<span class='shy'></span>dimension, <span class='keyword'>struct</span> dimension_<span class='shy'></span>one<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#5.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,sqrt'><div id='lib:sqrt,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:sqrt,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension____________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_____________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1511'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>pow<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>2</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,cbrt'><div id='lib:cbrt,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:cbrt,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension______________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span><a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_______________________'><span class='texttt'>Dimension</span></span></a> <span class='keyword'>auto</span> d<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1522'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>pow<span class='anglebracket'>&lt;</span><span class='literal'>1</span>, <span class='literal'>3</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>d<span class='parenthesis'>)</span></span><a class='hidden_link' href='#7.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,7 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim.sym.fmt]</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#qty.dim.sym.fmt'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref' href='qty.dim.html#sym.fmt'>[qty.dim]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.2.5</a> Symbol formatting <a class='abbr_ref'>[qty.dim.sym.fmt]</a></h4><div class='texpara'><div id='lib:Dimension,dimension_symbol_to'><div id='lib:dimension_symbol_to,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_symbol_to,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, std<span class='operator'>::</span>output_iterator<span class='anglebracket'>&lt;</span>CharT<span class='anglebracket'>&gt;</span> Out, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> Out dimension_symbol_to<span class='parenthesis'>(</span>Out out, D d, <span class='keyword'>const</span> dimension_symbol_formatting<span class='operator'>&amp;</span> fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1536'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Effects</i>: TBD<a class='hidden_link' href='#1.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1540'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:Dimension,dimension_symbol'><div id='lib:dimension_symbol,Dimension'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_symbol,Dimension'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>dimension_symbol_formatting fmt <span class='operator'>=</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>, <span class='keyword'>typename</span> CharT <span class='operator'>=</span> <span class='keyword'>char</span>, <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension_'><span class='texttt'>Dimension</span></span></a> D<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> std<span class='operator'>::</span>string_view dimension_symbol<span class='parenthesis'>(</span>D<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1552'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>TBD<span class='operator'>.</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,33 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.dim.types]</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#qty.dim.types'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.2</a> Dimension <a class='abbr_ref' href='qty.dim.html#types'>[qty.dim]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.2.3</a> Types <a class='abbr_ref'>[qty.dim.types]</a></h4><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>symbol_text Symbol<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:base_dimension'><a class='hidden_link' href='#lib:base_dimension' title='5.4.2.3&emsp;Types&emsp;[qty.dim.types]'>base_dimension</a></span> <span class='operator'>:</span> <i >dimension-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <i >symbol</i> <span class='operator'>=</span> Symbol; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1375'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>base_<span class='shy'></span>dimension</span> is used
to define the dimension of a base quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-08">IEC 60050, 112-01-08</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'><span class='texttt'>Symbol</span> is its symbolic representation<a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>struct</span> dim_length <span class='keyword'>final</span> <span class='operator'>:</span> base_dimension<span class='anglebracket'>&lt;</span><span class='literal'>"L"</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span> dim_length;
</span>&nbsp;<i>end example</i>]</div></div></div><div class='texpara'><span id='lib:derived_dimension'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:derived_dimension'>🔗</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><span class='keyword'>typename</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <i >derived-dimension-impl</i> <span class='comment'>// <i >exposition only</i></span>
<span class='operator'>:</span> <i >expr-fractions</i><span class='anglebracket'>&lt;</span><span class='keyword'>struct</span> dimension_one, Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SymbolicConstant'></a><i >SymbolicConstant</i><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Expr<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> derived_dimension <span class='keyword'>final</span> <span class='operator'>:</span> <i >dimension-interface</i>, <i >derived-dimension-impl</i><span class='anglebracket'>&lt;</span>Expr<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1399'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><span class='texttt'>derived_<span class='shy'></span>dimension</span> is used by the library
to represent the dimension of a derived quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-10">IEC 60050, 112-01-10</a>)<a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='example-2' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-2'>2</a></i>:&ensp;<span class='codeblock'><span class='keyword'>constexpr</span> <span class='keyword'>auto</span> dim_acceleration <span class='operator'>=</span> isq<span class='operator'>::</span>speed<span class='operator'>.</span>dimension <span class='operator'>/</span> isq<span class='operator'>::</span>dim_time;
<span class='keyword'>int</span> x <span class='operator'>=</span> dim_acceleration; <span class='comment'>// error: cannot construct from</span>
<span class='comment'>// <span class='tcode_in_codeblock'>derived_<span class='shy'></span>dimension&lt;isq&#x200b;::&#x200b;dim_<span class='shy'></span>length, per&lt;power&lt;isq&#x200b;::&#x200b;dim_<span class='shy'></span>time, 2&gt;&gt;&gt;</span></span>
</span>&nbsp;<i>end example</i>]</div></div> <div id='2.sentence-2' class='sentence'>
A program that instantiates a specialization of <span class='texttt'>derived_<span class='shy'></span>dimension</span>
that is not a possible result of the library specifications
is ill-formed, no diagnostic required<a class='hidden_link' href='#2.sentence-2'>.</a></div></div><div class='texpara'><span id='lib:dimension_one'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:dimension_one'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> dimension_one <span class='keyword'>final</span> <span class='operator'>:</span> <i >dimension-interface</i>, <i >derived-dimension-impl</i><span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div></div><div class='para' id='3'><div class='marginalizedparent'><a class='marginalized' href='#3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1422'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><span class='texttt'>dimension_<span class='shy'></span>one</span> represents the dimension of a quantity of dimension one (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-13">IEC 60050, 112-01-13</a>)<a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,19 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.fp.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.fp.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.fp.traits'>[qty.rep.traits]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.2.1</a> Floating-point <a class='abbr_ref'>[qty.fp.traits]</a></h4><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'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span> <span class='operator'>:</span> <span class='texttt'><i >cond-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='comment'>// see <a href="https://wg21.link/readable.traits">N4971, [readable.traits]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>is_pointer_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>!</span>std<span class='operator'>::</span>is_array_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type; <span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>:</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >actual-value-type-t</i></span> <span class='operator'>=</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <span id='lib:treat_as_floating_point'><a class='hidden_link' href='#lib:treat_as_floating_point' title='5.5.2.1&emsp;Floating-point&emsp;[qty.fp.traits]'>treat_as_floating_point</a></span> <span class='operator'>=</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>treat_as_floating_point_v<span class='anglebracket'>&lt;</span><span class='texttt'><i >actual-value-type-t</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3708'>#</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'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
to help determine whether implicit conversions are allowed among them<a class='hidden_link' href='#1.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3712'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize <span class='texttt'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
for cv-unqualified program-defined types<a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#2.sentence-2'>.</a></div></div></div></div></div></body></html>

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.general]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#general'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.1</a> General <a class='abbr_ref'>[qty.general]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4063'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Subclause <a href='qty.html' title='5.6&emsp;Quantity'>[qty]</a> describes the class template <span class='texttt'>quantity</span>
that represents the value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-28">IEC 60050, 112-01-28</a>)
that is an element of a vector space (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-01,102-03-04">IEC 60050, 102-03-01,102-03-04</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,18 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.get.kind]</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#qty.get.kind'>[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#qty.get.kind'>[qty.spec]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.3.6</a> Hierarchy algorithms <a class='abbr_ref' href='qty.spec.hier.algos.html#qty.get.kind'>[qty.spec.hier.algos]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.6.2</a> Get kind <a class='abbr_ref'>[qty.get.kind]</a></h4><div class='texpara'><div id='lib:get-kind-tree-root,QuantitySpec'><div id='lib:QuantitySpec,get-kind-tree-root'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:QuantitySpec,get-kind-tree-root'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> <span class='texttt'><i >get-kind-tree-root</i></span><span class='parenthesis'>(</span>Q q<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2095'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <ul class='itemize'><li id='1.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.1'>(1.1)</a></div><div class='texpara'><div id='1.1.sentence-1' class='sentence'>If <span class='texttt'><a class='index' id='conceptref:QuantityKindSpec'></a><span class='texttt'><i >QuantityKindSpec</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span></span> is <span class='texttt'><span class='literal'>true</span></span>,
returns <span class='texttt'><span class='texttt'><i >remove-kind</i></span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span></span><a class='hidden_link' href='#1.1.sentence-1'>.</a></div></div></li><li id='1.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.2'>(1.2)</a></div><div class='texpara'><div id='1.2.sentence-1' class='sentence'>Otherwise, if
<span class='texttt'><span class='texttt'><i >is-derived-from-specialization-of</i></span><span class='anglebracket'>&lt;</span>Q, quantity_<span class='shy'></span>spec<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span></span>
is <span class='texttt'><span class='literal'>true</span></span>, and
the specialization of <span class='texttt'>Q<span class='operator'>&#x200b;::&#x200b;</span>quantity_<span class='shy'></span>spec</span> has a template argument equal to <span class='texttt'>is_<span class='shy'></span>kind</span>,
returns <span class='texttt'>q</span><a class='hidden_link' href='#1.2.sentence-1'>.</a></div></div></li><li id='1.3'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.3'>(1.3)</a></div><div class='texpara'><div id='1.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>Q<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >parent</i></span></span> is a valid expression,
returns <span class='texttt'><span class='texttt'><i >get-kind-tree-root</i></span><span class='parenthesis'>(</span>Q<span class='operator'>&#x200b;::&#x200b;</span><span class='texttt'><i >parent</i></span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#1.3.sentence-1'>.</a></div></div></li><li id='1.4'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.4'>(1.4)</a></div><div class='texpara'><div id='1.4.sentence-1' class='sentence'>Otherwise, if <span class='texttt'><a class='index' id='conceptref:DerivedQuantitySpec'></a><span class='texttt'><i >DerivedQuantitySpec</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span></span> is <span class='texttt'><span class='literal'>true</span></span>,
returns
<span class='codeblock'><i >expr-map</i><span class='anglebracket'>&lt;</span><i >to-kind</i>, derived_quantity_spec, <span class='keyword'>struct</span> dimensionless<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>
</span>
where <span class='texttt'><i >to-kind</i></span> is defined as follows:
<span class='codeblock'><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'>using</span> <i >to-kind</i> <span class='operator'>=</span> <span class='keyword'>decltype</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='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</span></div></div></li><li id='1.5'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#1.5'>(1.5)</a></div><div class='texpara'><div id='1.5.sentence-1' class='sentence'>Otherwise, returns <span class='texttt'>q</span><a class='hidden_link' href='#1.5.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div class='texpara'><div id='lib:QuantitySpec,get_kind'><div id='lib:get_kind,QuantitySpec'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_kind,QuantitySpec'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a class='index' id='conceptref:QuantityKindSpec_'></a><span class='texttt'><i >QuantityKindSpec</i></span> <span class='keyword'>auto</span> get_kind<span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2133'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>kind_<span class='shy'></span>of<span class='anglebracket'>&lt;</span><span class='texttt'><i >get-kind-tree-root</i></span><span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,708 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[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.6</a> Quantity <a class='abbr_ref'>[qty]</a></h2><div id='general' class='section'><h3 ><a class='secnum' href='#general' style='min-width:80pt'>5.6.1</a> General <a class='abbr_ref' href='qty.general.html'>[qty.general]</a></h3><div class='para' id='general-1'><div class='marginalizedparent'><a class='marginalized' href='#general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4063'>#</a></div><div class='texpara'><div id='general-1.sentence-1' class='sentence'>Subclause [qty] describes the class template <span class='texttt'>quantity</span>
that represents the value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-28">IEC 60050, 112-01-28</a>)
that is an element of a vector space (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-01,102-03-04">IEC 60050, 102-03-01,102-03-04</a>)<a class='hidden_link' href='#general-1.sentence-1'>.</a></div></div></div></div><div id='like' class='section'><h3 ><a class='secnum' href='#like' style='min-width:80pt'>5.6.2</a> Interoperability <a class='abbr_ref' href='qty.like.html'>[qty.like]</a></h3><div class='para' id='like-1'><div class='marginalizedparent'><a class='marginalized' href='#like-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4070'>#</a></div><div class='texpara'><div id='like-1.sentence-1' class='sentence'>The interfaces specified in this subclause and subclause <a href='qty.pt.like.html' title='5.7.3&emsp;Interoperability'>[qty.<span class='shy'></span>pt.<span class='shy'></span>like]</a>
are used by <span class='texttt'>quantity</span> and <span class='texttt'>quantity_<span class='shy'></span>point</span>
to specify conversions with other types representing quantities<a class='hidden_link' href='#like-1.sentence-1'>.</a></div> <div id='like-note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#like-note-1'>1</a></i>:&ensp;<div id='like-1.sentence-2' class='sentence'><a href='qty.chrono.html' title='5.9&emsp;std&#x200b;::&#x200b;chrono interoperability'>[qty.<span class='shy'></span>chrono]</a> implements them for <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>chrono<span class='operator'>&#x200b;::&#x200b;</span>duration</span> and <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>chrono<span class='operator'>&#x200b;::&#x200b;</span>time_<span class='shy'></span>point</span><a class='hidden_link' href='#like-1.sentence-2'>.</a></div>&nbsp;<i>end note</i>]</div></div></div></div><div class='texpara'><div class='itemdecl' id='like-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#like-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span><span class='anglebracket'>&gt;</span> <span class='keyword'>typename</span> Traits<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >qty-like-impl</i></span><a class='index' id='concept:qty-like-impl'></a> <span class='operator'>=</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> T<span class='operator'>&amp;</span> qty, <span class='keyword'>const</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='operator'>&amp;</span> num<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>{</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>qty<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>num<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='parenthesis'>)</span>, <span class='keyword'>const</span> <span class='keyword'>bool</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export<span class='parenthesis'>)</span>, <span class='keyword'>const</span> <span class='keyword'>bool</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>typename</span> std<span class='operator'>::</span>bool_constant<span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='anglebracket'>&gt;</span>;
<span class='keyword'>typename</span> std<span class='operator'>::</span>bool_constant<span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='concept:QuantityLike'><span id='lib:QuantityLike'><span class='texttt'>QuantityLike</span></span></span></a> <span class='operator'>=</span> <span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:qty-like-impl'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>T, quantity_like_traits<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> quantity<span class='anglebracket'>&lt;</span>quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='like-2'><div class='marginalizedparent'><a class='marginalized' href='#like-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4095'>#</a></div><div class='texpara'><div id='like-2.sentence-1' class='sentence'>In the following descriptions, let
<ul class='itemize'><li id='like-2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-2.1'>(2.1)</a></div><span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>like_<span class='shy'></span>traits</span> or <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits</span>,</li><li id='like-2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-2.2'>(2.2)</a></div><span class='texttt'>Q</span> be a type for which <span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span></span> is specialized,</li><li id='like-2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-2.3'>(2.3)</a></div><span class='texttt'>qty</span> be an lvalue of type <span class='texttt'><span class='keyword'>const</span> Q</span>, and</li><li id='like-2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-2.4'>(2.4)</a></div><span class='texttt'>num</span> be an lvalue of type <span class='texttt'><span class='keyword'>const</span> Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>rep</span><a class='hidden_link' href='#like-2.sentence-1'>.</a></li></ul></div></div></div><div class='para' id='like-3'><div class='marginalizedparent'><a class='marginalized' href='#like-3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4108'>#</a></div><div class='texpara'><div id='like-3.sentence-1' class='sentence'><span class='texttt'>Q</span> models <span class='texttt'><a class='index' id='conceptref:qty-like-impl_'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&gt;</span></span> if and only if:
<ul class='itemize'><li id='like-3.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-3.1'>(3.1)</a></div><div class='texpara'><div id='like-3.1.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>to_<span class='shy'></span>numerical_<span class='shy'></span>value<span class='parenthesis'>(</span>qty<span class='parenthesis'>)</span></span> returns the numerical value (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>) of <span class='texttt'>qty</span><a class='hidden_link' href='#like-3.1.sentence-1'>.</a></div></div></li><li id='like-3.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-3.2'>(3.2)</a></div><div class='texpara'><div id='like-3.2.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>from_<span class='shy'></span>numerical_<span class='shy'></span>value<span class='parenthesis'>(</span>num<span class='parenthesis'>)</span></span> returns a <span class='texttt'>Q</span> with numerical value <span class='texttt'>num</span><a class='hidden_link' href='#like-3.2.sentence-1'>.</a></div></div></li><li id='like-3.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-3.3'>(3.3)</a></div><div class='texpara'><div id='like-3.3.sentence-1' class='sentence'>If <span class='texttt'>Traits</span> is <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits</span>,
both numerical values are offset from <span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>point_<span class='shy'></span>origin</span><a class='hidden_link' href='#like-3.3.sentence-1'>.</a></div></div></li></ul></div></div></div><div class='para' id='like-4'><div class='marginalizedparent'><a class='marginalized' href='#like-4'>4</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4120'>#</a></div><div class='texpara'><div id='like-4.sentence-1' class='sentence'>If the following expression is <span class='texttt'><span class='literal'>true</span></span>, the specified conversion will be explicit<a class='hidden_link' href='#like-4.sentence-1'>.</a></div> <ul class='itemize'><li id='like-4.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-4.1'>(4.1)</a></div><div class='texpara'><div id='like-4.1.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>explicit_<span class='shy'></span>import</span> for the conversion from <span class='texttt'>Q</span> to this library's type<a class='hidden_link' href='#like-4.1.sentence-1'>.</a></div></div></li><li id='like-4.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#like-4.2'>(4.2)</a></div><div class='texpara'><div id='like-4.2.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>explicit_<span class='shy'></span>export</span> for the conversion from this library's type to <span class='texttt'>Q</span><a class='hidden_link' href='#like-4.2.sentence-1'>.</a></div></div></li></ul></div></div></div><div id='syn' class='section'><h3 ><a class='secnum' href='#syn' style='min-width:80pt'>5.6.3</a> Class template <span class='texttt'>quantity</span> <a class='abbr_ref' href='qty.syn.html'>[qty.syn]</a></h3><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> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='concept:Quantity'><span id='lib:Quantity'><span class='tcode_in_codeblock'>Quantity</span></span></span></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityOf' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='concept:QuantityOf'><span id='lib:QuantityOf'><span class='tcode_in_codeblock'>QuantityOf</span></span></span></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <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>Q<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> UFrom, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='tcode_in_codeblock'>Unit</span></span></a> UTo<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> <i >integral-conversion-factor</i><span class='parenthesis'>(</span>UFrom from, UTo to<span class='parenthesis'>)</span> <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> <i >is-integral</i><span class='parenthesis'>(</span><i >get-canonical-unit</i><span class='parenthesis'>(</span>from<span class='parenthesis'>)</span><span class='operator'>.</span>mag <span class='operator'>/</span> <i >get-canonical-unit</i><span class='parenthesis'>(</span>to<span class='parenthesis'>)</span><span class='operator'>.</span>mag<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >IsFloatingPoint</i><a class='index' id='concept:IsFloatingPoint'></a> <span class='operator'>=</span> treat_as_floating_point<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FromRep, <span class='keyword'>typename</span> ToRep, <span class='keyword'>auto</span> FromUnit <span class='operator'>=</span> one, <span class='keyword'>auto</span> ToUnit <span class='operator'>=</span> one<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >ValuePreservingTo</i><a class='index' id='concept:ValuePreservingTo'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='tcode_in_codeblock'>Representation</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FromRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='tcode_in_codeblock'>Representation</span></span></a><span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='tcode_in_codeblock'>Unit</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>FromUnit<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___'><span class='tcode_in_codeblock'>Unit</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>ToUnit<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>assignable_from<span class='anglebracket'>&lt;</span>ToRep<span class='operator'>&amp;</span>, FromRep<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><i >IsFloatingPoint</i><span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:IsFloatingPoint'></a><i >IsFloatingPoint</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FromRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><i >integral-conversion-factor</i><span class='parenthesis'>(</span>FromUnit, ToUnit<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QFrom, <span class='keyword'>typename</span> QTo<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >QuantityConvertibleTo</i><a class='index' id='concept:QuantityConvertibleTo'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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='anglebracket'>&lt;</span>QFrom<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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='anglebracket'>&lt;</span>QTo<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:QuantitySpecConvertibleTo'></a><i >QuantitySpecConvertibleTo</i><span class='anglebracket'>&lt;</span>QFrom<span class='operator'>::</span>quantity_spec, QTo<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:UnitConvertibleTo'></a><i >UnitConvertibleTo</i><span class='anglebracket'>&lt;</span>QFrom<span class='operator'>::</span>unit, QTo<span class='operator'>::</span>unit<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QFrom<span class='operator'>::</span>rep, <span class='keyword'>typename</span> QTo<span class='operator'>::</span>rep, QFrom<span class='operator'>::</span>unit, QTo<span class='operator'>::</span>unit<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>QFrom q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>QTo<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>; <span class='comment'>// see <a href='#non.mem.conv' title='5.6.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>auto</span> QS, <span class='keyword'>typename</span> Func, <span class='keyword'>typename</span> T, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >InvokeResultOf</i><a class='index' id='concept:InvokeResultOf'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></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><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>QS<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>regular_invocable<span class='anglebracket'>&lt;</span>Func, T, U<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>invoke_result_t<span class='anglebracket'>&lt;</span>Func, T, U<span class='anglebracket'>&gt;</span>, QS<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Func, <span class='keyword'>typename</span> Q1, <span class='keyword'>typename</span> Q2,
<span class='keyword'>auto</span> QS <span class='operator'>=</span> std<span class='operator'>::</span>invoke_result_t<span class='anglebracket'>&lt;</span>Func, <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>Q1<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>,
<span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>Q2<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >InvocableQuantities</i><a class='index' id='concept:InvocableQuantities'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></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><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>QS<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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='anglebracket'>&lt;</span>Q1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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='anglebracket'>&lt;</span>Q2<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>QS, Func, <span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>auto</span> R1, <span class='keyword'>auto</span> R2<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >HaveCommonReference</i><a class='index' id='concept:HaveCommonReference'></a> <span class='operator'>=</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_common_reference<span class='parenthesis'>(</span>R1, R2<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Func, Quantity Q1, Quantity Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <i >common-quantity-for</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
quantity<span class='anglebracket'>&lt;</span>get_common_reference<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='parenthesis'>)</span>,
std<span class='operator'>::</span>invoke_result_t<span class='anglebracket'>&lt;</span>Func, <span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Func, <span class='keyword'>typename</span> Q1, <span class='keyword'>typename</span> Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >CommonlyInvocableQuantities</i><a class='index' id='concept:CommonlyInvocableQuantities'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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='anglebracket'>&lt;</span>Q1<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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='anglebracket'>&lt;</span>Q2<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:HaveCommonReference'></a><i >HaveCommonReference</i><span class='anglebracket'>&lt;</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>Q1, <i >common-quantity-for</i><span class='anglebracket'>&lt;</span>Func, Q1, Q2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>Q2, <i >common-quantity-for</i><span class='anglebracket'>&lt;</span>Func, Q1, Q2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvocableQuantities'></a><i >InvocableQuantities</i><span class='anglebracket'>&lt;</span>Func, Q1, Q2,
get_common_quantity_spec<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>quantity_spec, Q2<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>auto</span> R1, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep1, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >SameValueAs</i><a class='index' id='concept:SameValueAs'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R1<span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>R2<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>Rep1, Rep2<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <i >quantity-like-type</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
quantity<span class='anglebracket'>&lt;</span>quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>typename</span> U, <span class='keyword'>typename</span> TT <span class='operator'>=</span> std<span class='operator'>::</span>remove_reference_t<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <i >Mutable</i><a class='index' id='concept:Mutable'></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>is_const_v<span class='anglebracket'>&lt;</span>TT<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>TT, U<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R, <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> <span id='lib:quantity'><a class='hidden_link' href='#lib:quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'>quantity</a></span> <span class='curlybracket'>{</span>
<span class='keyword'>public</span><span class='operator'>:</span>
Rep <i >numerical-value</i>; <span class='comment'>// <i >exposition only</i></span>
<span class='comment'>// member types and values</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> reference <span class='operator'>=</span> R;
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> quantity_spec <span class='operator'>=</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> dimension <span class='operator'>=</span> quantity_spec<span class='operator'>.</span>dimension;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> unit <span class='operator'>=</span> get_unit<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>using</span> rep <span class='operator'>=</span> Rep;
<span class='comment'>// <a href='#static' title='5.6.4&emsp;Static member functions'>[qty.<span class='shy'></span>static]</a>, static member functions</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity one<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='#cons' title='5.6.5&emsp;Constructors and assignment'>[qty.<span class='shy'></span>cons]</a>, constructors and assignment</span>
quantity<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity<span class='parenthesis'>(</span>quantity<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='operator'>~</span>quantity<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='tcode_in_codeblock'>Reference</span></span></a> R2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:SameValueAs'></a><i >SameValueAs</i><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='tcode_in_codeblock'>Reference</span></span></a> R2, <span class='keyword'>typename</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:SameValueAs_'></a><i >SameValueAs</i><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, Value, Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:QuantityConvertibleTo'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:QuantityConvertibleTo_'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike'><span class='tcode_in_codeblock'>QuantityLike</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo__'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span><i >quantity-like-type</i><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
quantity<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>quantity<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo_'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#conv' title='5.6.6&emsp;Conversions'>[qty.<span class='shy'></span>conv]</a>, conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo___'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo____'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo_____'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity,
quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith___'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='comment'>// <a href='#obs' title='5.6.7&emsp;Numerical value observers'>[qty.<span class='shy'></span>obs]</a>, numerical value observers</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_____'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit______'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_______'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>void</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith____'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo______'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>quantity_spec, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> rep numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith_____'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> rep force_numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span>;
<span class='comment'>// <a href='#conv.ops' title='5.6.8&emsp;Conversion operations'>[qty.<span class='shy'></span>conv.<span class='shy'></span>ops]</a>, conversion operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> V_, std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>V_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>explicit</span> <span class='keyword'>operator</span> V_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q_, <a href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike_'><span class='tcode_in_codeblock'>QuantityLike</span></span></a> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo_______'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity, <i >quantity-like-type</i><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> Q_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#unary.ops' title='5.6.9&emsp;Unary operations'>[qty.<span class='shy'></span>unary.<span class='shy'></span>ops]</a>, unary operations</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='#assign.ops' title='5.6.10&emsp;Compound assignment operations'>[qty.<span class='shy'></span>assign.<span class='shy'></span>ops]</a>, compound assignment operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable__'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable___'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable____'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>%</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_____'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo__'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable______'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo___'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_______'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='#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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable________'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='#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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#arith.ops' title='5.6.11&emsp;Arithmetic operations'>[qty.<span class='shy'></span>arith.<span class='shy'></span>ops]</a>, arithmetic operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities'></a><i >CommonlyInvocableQuantities</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities_'></a><i >CommonlyInvocableQuantities</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:CommonlyInvocableQuantities__'></a><i >CommonlyInvocableQuantities</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf__'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf___'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf____'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation______'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_____'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_______'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf______'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities_'></a><i >InvocableQuantities</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities__'></a><i >InvocableQuantities</i><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_______'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf________'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_________'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______'><span class='tcode_in_codeblock'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf__________'></a><i >InvokeResultOf</i><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span><span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#cmp' title='5.6.12&emsp;Comparison'>[qty.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation________'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_________'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#val.cmp' title='5.6.13&emsp;Value comparison'>[qty.<span class='shy'></span>val.<span class='shy'></span>cmp]</a>, value comparison</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_eq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_neq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_lt_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_gt_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_lteq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_gteq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__________'><span class='tcode_in_codeblock'>Representation</span></span></a> Value, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
quantity<span class='parenthesis'>(</span>Value, R<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___________'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
quantity<span class='parenthesis'>(</span>Value<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity<span class='anglebracket'>&lt;</span>one, Value<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike__'><span class='tcode_in_codeblock'>QuantityLike</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>explicit</span><span class='parenthesis'>(</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity<span class='anglebracket'>&lt;</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='syn-1'><div class='marginalizedparent'><a class='marginalized' href='#syn-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4466'>#</a></div><div class='texpara'><div id='syn-1.sentence-1' class='sentence'><span class='texttt'>quantity<span class='anglebracket'>&lt;</span>R, Rep<span class='anglebracket'>&gt;</span></span> is a structural type (<a href="https://wg21.link/temp.paramterm.structural.type">N4971, [temp.param]</a>)
if <span class='texttt'>Rep</span> is a structural type<a class='hidden_link' href='#syn-1.sentence-1'>.</a></div></div></div></div><div id='static' class='section'><h3 ><a class='secnum' href='#static' style='min-width:80pt'>5.6.4</a> Static member functions <a class='abbr_ref' href='qty.static.html'>[qty.static]</a></h3><div class='texpara'><div id='lib:quantity,max'><div id='lib:max,quantity'><div id='lib:quantity,min'><div id='lib:min,quantity'><div id='lib:quantity,one'><div id='lib:one,quantity'><div id='lib:quantity,zero'><div id='lib:zero,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:zero,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity one<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div></div></div></div></div><div class='para' id='static-1'><div class='marginalizedparent'><a class='marginalized' href='#static-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4488'>#</a></div><div class='texpara'><div id='static-1.sentence-1' class='sentence'>Let <i >F</i> be one of <span class='texttt'>zero</span>, <span class='texttt'>one</span>, <span class='texttt'>min</span>, and <span class='texttt'>max</span><a class='hidden_link' href='#static-1.sentence-1'>.</a></div></div></div></div><div class='para' id='static-2'><div class='marginalizedparent'><a class='marginalized' href='#static-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4491'>#</a></div><div class='texpara'><div id='static-2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='curlybracket'>{</span>representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>, R<span class='curlybracket'>}</span></span><a class='hidden_link' href='#static-2.sentence-1'>.</a></div></div></div></div><div class='para' id='static-3'><div class='marginalizedparent'><a class='marginalized' href='#static-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4495'>#</a></div><div class='texpara'><div id='static-3.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> representation_values<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='operator'>::</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='cons' class='section'><h3 ><a class='secnum' href='#cons' style='min-width:80pt'>5.6.5</a> Constructors and assignment <a class='abbr_ref' href='qty.cons.html'>[qty.cons]</a></h3><div class='texpara'><div id='lib:quantity,constructor'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_________'><span class='texttt'>Reference</span></span></a> R2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:SameValueAs__'></a><span class='texttt'><i >SameValueAs</i></span><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo____'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-1'><div class='marginalizedparent'><a class='marginalized' href='#cons-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4517'>#</a></div><div class='texpara'><div id='cons-1.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >numerical-value</i></span> with <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span></span><a class='hidden_link' href='#cons-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdValue, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__________'><span class='texttt'>Reference</span></span></a> R2, <span class='keyword'>typename</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:SameValueAs___'></a><span class='texttt'><i >SameValueAs</i></span><span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, R, Value, Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:QuantityConvertibleTo________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v, R2<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-2'><div class='marginalizedparent'><a class='marginalized' href='#cons-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4531'>#</a></div><div class='texpara'><div id='cons-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>quantity<span class='parenthesis'>(</span>quantity<span class='anglebracket'>&lt;</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Value<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span>, R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#cons-2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:QuantityConvertibleTo_________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-3'><div class='marginalizedparent'><a class='marginalized' href='#cons-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4544'>#</a></div><div class='texpara'><div id='cons-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to <span class='texttt'><span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span></span> (<a href='#non.mem.conv' title='5.6.15&emsp;Non-member conversions'>[qty.<span class='shy'></span>non.<span class='shy'></span>mem.<span class='shy'></span>conv]</a>)<a class='hidden_link' href='#cons-3.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,constructor___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,constructor___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike___'><span class='texttt'>QuantityLike</span></span></a> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo__________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >quantity-like-type</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity<span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-4'><div class='marginalizedparent'><a class='marginalized' href='#cons-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4557'>#</a></div><div class='texpara'><div id='cons-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>quantity<span class='parenthesis'>(</span><span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>,
quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference<span class='curlybracket'>}</span><span class='parenthesis'>)</span>
</span></div></div></div></div><div class='para' id='cons-5'><div class='marginalizedparent'><a class='marginalized' href='#cons-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4565'>#</a></div><div class='texpara'><div id='cons-5.sentence-1' class='sentence'><i >Remarks</i>: The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator='><div id='lib:operator=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:ValuePreservingTo_____'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> FwdValue<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>FwdValue<span class='operator'>&amp;</span><span class='operator'>&amp;</span> v<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='cons-6'><div class='marginalizedparent'><a class='marginalized' href='#cons-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4582'>#</a></div><div class='texpara'><div id='cons-6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to <span class='texttt'><span class='texttt'><i >numerical-value</i></span> <span class='operator'>=</span> std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdValue<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>v<span class='parenthesis'>)</span></span><a class='hidden_link' href='#cons-6.sentence-1'>.</a></div></div></div></div><div class='para' id='cons-7'><div class='marginalizedparent'><a class='marginalized' href='#cons-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4586'>#</a></div><div class='texpara'><div id='cons-7.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span><a class='hidden_link' href='#cons-7.sentence-1'>.</a></div></div></div></div></div><div id='conv' class='section'><h3 ><a class='secnum' href='#conv' style='min-width:80pt'>5.6.6</a> Conversions <a class='abbr_ref' href='qty.conv.html'>[qty.conv]</a></h3><div class='texpara'><div id='lib:quantity,in'><div id='lib:in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith______'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo___________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-1'><div class='marginalizedparent'><a class='marginalized' href='#conv-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4601'>#</a></div><div class='texpara'><div id='conv-1.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_<span class='shy'></span>spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,in_'><div id='lib:in,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf______'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo____________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-2'><div class='marginalizedparent'><a class='marginalized' href='#conv-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4615'>#</a></div><div class='texpara'><div id='conv-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> quantity<span class='anglebracket'>&lt;</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,in__'><div id='lib:in,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_______'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_______'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo_____________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity,
quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-3'><div class='marginalizedparent'><a class='marginalized' href='#conv-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4631'>#</a></div><div class='texpara'><div id='conv-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>quantity_spec, ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span><span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in'><div id='lib:force_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith________'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-4'><div class='marginalizedparent'><a class='marginalized' href='#conv-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4647'>#</a></div><div class='texpara'><div id='conv-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in_'><div id='lib:force_in,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-5'><div class='marginalizedparent'><a class='marginalized' href='#conv-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4661'>#</a></div><div class='texpara'><div id='conv-5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_in__'><div id='lib:force_in,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_in,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_________'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-6'><div class='marginalizedparent'><a class='marginalized' href='#conv-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4676'>#</a></div><div class='texpara'><div id='conv-6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> value_<span class='shy'></span>cast<span class='anglebracket'>&lt;</span>ToU<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span>;</span></div></div></div></div></div><div id='obs' class='section'><h3 ><a class='secnum' href='#obs' style='min-width:80pt'>5.6.7</a> Numerical value observers <a class='abbr_ref' href='qty.obs.html'>[qty.obs]</a></h3><div class='texpara'><div id='lib:quantity,numerical_value_ref_in'><div id='lib:numerical_value_ref_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:numerical_value_ref_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit________'><span class='texttt'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_________'><span class='texttt'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></div></div></div></div><div class='para' id='obs-1'><div class='marginalizedparent'><a class='marginalized' href='#obs-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4695'>#</a></div><div class='texpara'><div id='obs-1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >numerical-value</i></span><a class='hidden_link' href='#obs-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,numerical_value_in'><div id='lib:numerical_value_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:numerical_value_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__________'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo______________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> rep numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span>;
</code></div></div></div></div><div class='para' id='obs-2'><div class='marginalizedparent'><a class='marginalized' href='#obs-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4708'>#</a></div><div class='texpara'><div id='obs-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span><span class='operator'>.</span>in<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_numerical_value_in'><div id='lib:force_numerical_value_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_numerical_value_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith___________'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> rep force_numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span>;
</code></div></div></div></div><div class='para' id='obs-3'><div class='marginalizedparent'><a class='marginalized' href='#obs-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4722'>#</a></div><div class='texpara'><div id='obs-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span><span class='operator'>.</span>force_<span class='shy'></span>in<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div></div><div id='conv.ops' class='section'><h3 ><a class='secnum' href='#conv.ops' style='min-width:80pt'>5.6.8</a> Conversion operations <a class='abbr_ref' href='qty.conv.ops.html'>[qty.conv.ops]</a></h3><div class='texpara'><div id='lib:quantity,operator_constructible_from<Rep>'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,operator_constructible_from%3cRep%3e'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> V_, std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>V_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span>
<span class='keyword'>explicit</span> <span class='keyword'>operator</span> V_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></div></div></div><div class='para' id='conv.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4738'>#</a></div><div class='texpara'><div id='conv.ops-1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >numerical-value</i></span><a class='hidden_link' href='#conv.ops-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,operator_QuantityLike'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,operator_QuantityLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q_, <a href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='conceptref:QuantityLike____'><span class='texttt'>QuantityLike</span></span></a> Q <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo_______________'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, <span class='texttt'><i >quantity-like-type</i></span><span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> Q_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='conv.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4751'>#</a></div><div class='texpara'><div id='conv.ops-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>
numerical_value_in<span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='para' id='conv.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4759'>#</a></div><div class='texpara'><div id='conv.ops-3.sentence-1' class='sentence'><i >Remarks</i>: The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>Rep, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div> <div id='conv.ops-3.sentence-2' class='sentence'>
The exception specification is equivalent to:
<span class='codeblock'><span class='keyword'>noexcept</span><span class='parenthesis'>(</span>quantity_like_traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span><i >numerical-value</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>is_nothrow_copy_constructible_v<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div><div id='unary.ops' class='section'><h3 ><a class='secnum' href='#unary.ops' style='min-width:80pt'>5.6.9</a> Unary operations <a class='abbr_ref' href='qty.unary.ops.html'>[qty.unary.ops]</a></h3><div class='para' id='unary.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4775'>#</a></div><div class='texpara'><div id='unary.ops-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#unary.ops-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator-'><div id='lib:operator-,quantity'><div id='lib:quantity,operator+'><div id='lib:operator+,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='unary.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4789'>#</a></div><div class='texpara'><div id='unary.ops-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span>@<span class='texttt'><i >numerical-value</i></span>, reference<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='para' id='unary.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4794'>#</a></div><div class='texpara'><div id='unary.ops-3.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'><span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> rep v<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> @v <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</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:quantity,operator++'><div id='lib:operator++,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable__________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='unary.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4816'>#</a></div><div class='texpara'><div id='unary.ops-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>@q<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span></span><a class='hidden_link' href='#unary.ops-4.sentence-1'>.</a></div></div></div></div><div class='para' id='unary.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4821'>#</a></div><div class='texpara'><div id='unary.ops-5.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span></span><a class='hidden_link' href='#unary.ops-5.sentence-1'>.</a></div></div></div></div><div class='para' id='unary.ops-6'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4825'>#</a></div><div class='texpara'><div id='unary.ops-6.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'><span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> v<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> @v <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</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:quantity,operator++_'><div id='lib:operator++,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='unary.ops-7'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4845'>#</a></div><div class='texpara'><div id='unary.ops-7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span><span class='texttt'><i >numerical-value</i></span>@, reference<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='para' id='unary.ops-8'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4850'>#</a></div><div class='texpara'><div id='unary.ops-8.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'><span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> v<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> v@ <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='assign.ops' class='section'><h3 ><a class='secnum' href='#assign.ops' style='min-width:80pt'>5.6.10</a> Compound assignment operations <a class='abbr_ref' href='qty.assign.ops.html'>[qty.assign.ops]</a></h3><div class='para' id='assign.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4862'>#</a></div><div class='texpara'><div id='assign.ops-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#assign.ops-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator%='><div id='lib:operator%=,quantity'><div id='lib:quantity,operator-='><div id='lib:operator-=,quantity'><div id='lib:quantity,operator+='><div id='lib:operator+=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable___________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable____________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_____________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>%</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div><div class='para' id='assign.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4882'>#</a></div><div class='texpara'><div id='assign.ops-2.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span><span class='operator'>=</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#assign.ops-2.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4886'>#</a></div><div class='texpara'><div id='assign.ops-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>lhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span> @ rhs<span class='operator'>.</span>in<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span></span><a class='hidden_link' href='#assign.ops-3.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4891'>#</a></div><div class='texpara'><div id='assign.ops-4.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span></span><a class='hidden_link' href='#assign.ops-4.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4895'>#</a></div><div class='texpara'><div id='assign.ops-5.sentence-1' class='sentence'><i >Remarks</i>: Let <i >C</i> be
<ul class='itemize'><li id='assign.ops-5.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#assign.ops-5.1'>(5.1)</a></div><span class='texttt'><span class='parenthesis'>(</span><span class='operator'>!</span>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point<span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span></span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span><span class='operator'>=</span></span>, and</li><li id='assign.ops-5.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#assign.ops-5.2'>(5.2)</a></div><span class='texttt'><span class='literal'>true</span></span> otherwise<a class='hidden_link' href='#assign.ops-5.sentence-1'>.</a></li></ul></div> <div id='assign.ops-5.sentence-2' class='sentence'>
The expression in the <span class='textsf'><i >requires-clause</i></span> is equivalent to:
<span class='codeblock'><a class='index' id='conceptref:QuantityConvertibleTo________________'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span>, quantity<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Rep2 b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div><div class='para' id='assign.ops-6'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4912'>#</a></div><div class='texpara'><div id='assign.ops-6.sentence-1' class='sentence'><i >Recommended practice</i>: If <span class='texttt'>equivalent<span class='parenthesis'>(</span>unit, get_<span class='shy'></span>unit<span class='parenthesis'>(</span>rhs<span class='operator'>.</span>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span>,
then the expression <span class='texttt'>rhs<span class='operator'>.</span>in<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span></span> is replaced with <span class='texttt'>rhs</span><a class='hidden_link' href='#assign.ops-6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,operator/='><div id='lib:operator/=,quantity'><div id='lib:quantity,operator*='><div id='lib:operator*=,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*=,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable______________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo______'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_______________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a class='index' id='conceptref:ValuePreservingTo_______'></a><span class='texttt'><i >ValuePreservingTo</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span> Value<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='assign.ops-7'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4930'>#</a></div><div class='texpara'><div id='assign.ops-7.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span><span class='operator'>=</span></span>, then <span class='texttt'>rhs <span class='operator'>!</span><span class='operator'>=</span> representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#assign.ops-7.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-8'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4934'>#</a></div><div class='texpara'><div id='assign.ops-8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>lhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span> @ rhs</span><a class='hidden_link' href='#assign.ops-8.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-9'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4939'>#</a></div><div class='texpara'><div id='assign.ops-9.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span></span><a class='hidden_link' href='#assign.ops-9.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-10'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4943'>#</a></div><div class='texpara'><div id='assign.ops-10.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'><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Value b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</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:quantity,operator*=_'><div id='lib:operator*=,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*=,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable________________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='#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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_________________'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='#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>dimensionless<span class='anglebracket'>&gt;</span> Q2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span><span class='parenthesis'>(</span>Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='assign.ops-11'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-11'>11</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4965'>#</a></div><div class='texpara'><div id='assign.ops-11.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div><div class='para' id='assign.ops-12'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-12'>12</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4970'>#</a></div><div class='texpara'><div id='assign.ops-12.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'><span class='parenthesis'>(</span>Q2<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:ValuePreservingTo________'></a><i >ValuePreservingTo</i><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep, Rep<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>rep<span class='operator'>&amp;</span> a, <span class='keyword'>const</span> Q2<span class='operator'>::</span>rep b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> a @ b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>rep<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='arith.ops' class='section'><h3 ><a class='secnum' href='#arith.ops' style='min-width:80pt'>5.6.11</a> Arithmetic operations <a class='abbr_ref' href='qty.arith.ops.html'>[qty.arith.ops]</a></h3><div class='para' id='arith.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4983'>#</a></div><div class='texpara'><div id='arith.ops-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#arith.ops-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator%'><div id='lib:operator%,quantity'><div id='lib:quantity,operator-_'><div id='lib:operator-,quantity_'><div id='lib:quantity,operator+_'><div id='lib:operator+,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities___'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:CommonlyInvocableQuantities____'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>Rep2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:CommonlyInvocableQuantities_____'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div><div class='para' id='arith.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5004'>#</a></div><div class='texpara'><div id='arith.ops-2.sentence-1' class='sentence'>Let <i >F</i> be the first argument to <a class='index' id='conceptref:CommonlyInvocableQuantities______'></a><span class='texttt'><i >CommonlyInvocableQuantities</i></span><a class='hidden_link' href='#arith.ops-2.sentence-1'>.</a></div></div></div></div><div class='para' id='arith.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5007'>#</a></div><div class='texpara'><div id='arith.ops-3.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>%</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#arith.ops-3.sentence-1'>.</a></div></div></div></div><div class='para' id='arith.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5011'>#</a></div><div class='texpara'><div id='arith.ops-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>using</span> ret <span class='operator'>=</span> <i >common-quantity-for</i><span class='anglebracket'>&lt;</span><i >F</i>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>const</span> ret ret_lhs<span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>;
<span class='keyword'>const</span> ret ret_rhs<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span>;
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>
ret_lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ret<span class='operator'>::</span>unit<span class='parenthesis'>)</span> @ ret_rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ret<span class='operator'>::</span>unit<span class='parenthesis'>)</span>,
ret<span class='operator'>::</span>reference<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:quantity,operator-__'><div id='lib:operator-,quantity__'><div id='lib:quantity,operator+__'><div id='lib:operator+,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf___________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf____________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation______________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_____________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div><div class='para' id='arith.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5043'>#</a></div><div class='texpara'><div id='arith.ops-5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> lhs @ <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span>rhs<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:quantity,operator-___'><div id='lib:operator-,quantity___'><div id='lib:quantity,operator+___'><div id='lib:operator+,quantity___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_______________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf______________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>plus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation________________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_______________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>minus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_________________'><span class='texttt'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf________________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>modulus<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div><div class='para' id='arith.ops-6'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5068'>#</a></div><div class='texpara'><div id='arith.ops-6.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='operator'>&#x200b;::&#x200b;</span>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>quantity<span class='curlybracket'>{</span>lhs<span class='curlybracket'>}</span> @ rhs;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator/'><div id='lib:operator/,quantity'><div id='lib:quantity,operator*'><div id='lib:operator*,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities___'></a><span class='texttt'><i >InvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:InvocableQuantities____'></a><span class='texttt'><i >InvocableQuantities</i></span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='arith.ops-7'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5086'>#</a></div><div class='texpara'><div id='arith.ops-7.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#arith.ops-7.sentence-1'>.</a></div></div></div></div><div class='para' id='arith.ops-8'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5090'>#</a></div><div class='texpara'><div id='arith.ops-8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>
lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>rhs<span class='operator'>.</span>unit<span class='parenthesis'>)</span>, R @ R2<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:quantity,operator*_'><div id='lib:operator*,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___________'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf_________________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>typename</span> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____________'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf__________________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, Rep, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='arith.ops-9'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5113'>#</a></div><div class='texpara'><div id='arith.ops-9.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>rhs <span class='operator'>!</span><span class='operator'>=</span> representation_<span class='shy'></span>values<span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#arith.ops-9.sentence-1'>.</a></div></div></div></div><div class='para' id='arith.ops-10'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5117'>#</a></div><div class='texpara'><div id='arith.ops-10.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs, R<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:quantity,operator*__'><div id='lib:operator*,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____________'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf___________________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>multiplies<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Value, std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='operator'>!</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______________'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>Value<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:InvokeResultOf____________________'></a><span class='texttt'><i >InvokeResultOf</i></span><span class='anglebracket'>&lt;</span>quantity_spec, std<span class='operator'>::</span>divides<span class='anglebracket'>&lt;</span><span class='anglebracket'>&gt;</span>, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span>, Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> Value<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Q<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='arith.ops-11'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-11'>11</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5139'>#</a></div><div class='texpara'><div id='arith.ops-11.sentence-1' class='sentence'><i >Preconditions</i>: If <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>/</span></span>, then <span class='texttt'>is_<span class='shy'></span>neq_<span class='shy'></span>zero<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span></span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#arith.ops-11.sentence-1'>.</a></div></div></div></div><div class='para' id='arith.ops-12'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-12'>12</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5143'>#</a></div><div class='texpara'><div id='arith.ops-12.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity<span class='curlybracket'>{</span>lhs @ rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>, <span class='operator'>::</span>mp_units<span class='operator'>::</span>one @ R<span class='curlybracket'>}</span>;
</span></div></div></div></div></div><div id='cmp' class='section'><h3 ><a class='secnum' href='#cmp' style='min-width:80pt'>5.6.12</a> Comparison <a class='abbr_ref' href='qty.cmp.html'>[qty.cmp]</a></h3><div class='para' id='cmp-1'><div class='marginalizedparent'><a class='marginalized' href='#cmp-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5153'>#</a></div><div class='texpara'><div id='cmp-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#cmp-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator<=>'><div id='lib:operator<=>,quantity'><div id='lib:quantity,operator=='><div id='lib:operator==,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='cmp-2'><div class='marginalizedparent'><a class='marginalized' href='#cmp-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5169'>#</a></div><div class='texpara'><div id='cmp-2.sentence-1' class='sentence'>Let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#cmp-2.sentence-1'>.</a></div></div></div></div><div class='para' id='cmp-3'><div class='marginalizedparent'><a class='marginalized' href='#cmp-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5174'>#</a></div><div class='texpara'><div id='cmp-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>using</span> ct <span class='operator'>=</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>const</span> ct ct_lhs<span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>;
<span class='keyword'>const</span> ct ct_rhs<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span>;
<span class='keyword'>return</span> ct_lhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ct<span class='operator'>::</span>unit<span class='parenthesis'>)</span> @ ct_rhs<span class='operator'>.</span>numerical_value_ref_in<span class='parenthesis'>(</span>ct<span class='operator'>::</span>unit<span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='para' id='cmp-4'><div class='marginalizedparent'><a class='marginalized' href='#cmp-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5184'>#</a></div><div class='texpara'><div id='cmp-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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,operator<=>_'><div id='lib:operator<=>,quantity_'><div id='lib:quantity,operator==_'><div id='lib:operator==,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__________________'><span class='texttt'>Representation</span></span></a> Value<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span> Q, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation___________________'><span class='texttt'>Representation</span></span></a> Value<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> Q<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> Value<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='cmp-5'><div class='marginalizedparent'><a class='marginalized' href='#cmp-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5206'>#</a></div><div class='texpara'><div id='cmp-5.sentence-1' class='sentence'>Let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#cmp-5.sentence-1'>.</a></div></div></div></div><div class='para' id='cmp-6'><div class='marginalizedparent'><a class='marginalized' href='#cmp-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5211'>#</a></div><div class='texpara'><div id='cmp-6.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>lhs<span class='operator'>.</span>numerical_<span class='shy'></span>value_<span class='shy'></span>ref_<span class='shy'></span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span> @ rhs</span><a class='hidden_link' href='#cmp-6.sentence-1'>.</a></div></div></div></div><div class='para' id='cmp-7'><div class='marginalizedparent'><a class='marginalized' href='#cmp-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5215'>#</a></div><div class='texpara'><div id='cmp-7.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'><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >C</i><span class='anglebracket'>&lt;</span>Rep, Value<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div><div id='val.cmp' class='section'><h3 ><a class='secnum' href='#val.cmp' style='min-width:80pt'>5.6.13</a> Value comparison <a class='abbr_ref' href='qty.val.cmp.html'>[qty.val.cmp]</a></h3><div class='texpara'><div id='lib:quantity,is_gteq_zero'><div id='lib:is_gteq_zero,quantity'><div id='lib:quantity,is_lteq_zero'><div id='lib:is_lteq_zero,quantity'><div id='lib:quantity,is_gt_zero'><div id='lib:is_gt_zero,quantity'><div id='lib:quantity,is_lt_zero'><div id='lib:is_lt_zero,quantity'><div id='lib:quantity,is_neq_zero'><div id='lib:is_neq_zero,quantity'><div id='lib:quantity,is_eq_zero'><div id='lib:is_eq_zero,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:is_eq_zero,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_eq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_neq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_lt_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_gt_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_lteq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>bool</span> is_gteq_zero<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity<span class='operator'>&amp;</span> q<span class='parenthesis'>)</span> <span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class='para' id='val.cmp-1'><div class='marginalizedparent'><a class='marginalized' href='#val.cmp-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5241'>#</a></div><div class='texpara'><div id='val.cmp-1.sentence-1' class='sentence'>Let <span class='texttt'>is_<span class='shy'></span><i >F</i>_<span class='shy'></span>zero</span> be the function name<a class='hidden_link' href='#val.cmp-1.sentence-1'>.</a></div></div></div></div><div class='para' id='val.cmp-2'><div class='marginalizedparent'><a class='marginalized' href='#val.cmp-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5244'>#</a></div><div class='texpara'><div id='val.cmp-2.sentence-1' class='sentence'><i >Returns</i>: <ul class='itemize'><li id='val.cmp-2.1'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#val.cmp-2.1'>(2.1)</a></div><div class='texpara'><div id='val.cmp-2.1.sentence-1' class='sentence'>If <span class='texttt'><i >F</i></span> is <span class='texttt'>eq</span>, returns <span class='texttt'>q <span class='operator'>=</span><span class='operator'>=</span> zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#val.cmp-2.1.sentence-1'>.</a></div></div></li><li id='val.cmp-2.2'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#val.cmp-2.2'>(2.2)</a></div><div class='texpara'><div id='val.cmp-2.2.sentence-1' class='sentence'>Otherwise, if <span class='texttt'><i >F</i></span> is <span class='texttt'>neq</span>, returns <span class='texttt'>q <span class='operator'>!</span><span class='operator'>=</span> zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#val.cmp-2.2.sentence-1'>.</a></div></div></li><li id='val.cmp-2.3'><div class='marginalizedparent' style='left:-39mm'><a class='marginalized' href='#val.cmp-2.3'>(2.3)</a></div><div class='texpara'><div id='val.cmp-2.3.sentence-1' class='sentence'>Otherwise, returns <span class='texttt'>is_<span class='shy'></span><i >F</i><span class='parenthesis'>(</span>q <span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span> zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> (<a href="https://wg21.link/compare.syn">N4971, [compare.syn]</a>)<a class='hidden_link' href='#val.cmp-2.3.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div class='para' id='val.cmp-3'><div class='marginalizedparent'><a class='marginalized' href='#val.cmp-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5255'>#</a></div><div class='texpara'><div id='val.cmp-3.sentence-1' class='sentence'><i >Remarks</i>: Let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <i >F</i> is <span class='texttt'>eq</span> or <span class='texttt'>neq</span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable_<span class='shy'></span>with</span> otherwise<a class='hidden_link' href='#val.cmp-3.sentence-1'>.</a></div> <div id='val.cmp-3.sentence-2' class='sentence'>The expression in the <span class='textsf'><i >requires-clause</i></span> is equivalent to:
<span class='codeblock'><span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> T<span class='operator'>::</span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >C</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='delta' class='section'><h3 ><a class='secnum' href='#delta' style='min-width:80pt'>5.6.14</a> Construction helper <span class='texttt'>delta</span> <a class='abbr_ref' href='qty.delta.html'>[qty.delta]</a></h3><div class='texpara'><span id='lib:delta_'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:delta_'>🔗</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.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______________'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> delta_ <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__________'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:delta_,operator()'><div id='lib:operator(),delta_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator(),delta_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='delta-1'><div class='marginalizedparent'><a class='marginalized' href='#delta-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5292'>#</a></div><div class='texpara'><div id='delta-1.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> quantity<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;</span></div></div></div></div></div><div id='non.mem.conv' class='section'><h3 ><a class='secnum' href='#non.mem.conv' style='min-width:80pt'>5.6.15</a> Non-member conversions <a class='abbr_ref' href='qty.non.mem.conv.html'>[qty.non.mem.conv]</a></h3><div class='texpara'><div id='lib:sudo-cast,quantity'><div id='lib:quantity,sudo-cast'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,sudo-cast'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity_________________________________________'><span class='texttt'>Quantity</span></span></a> To, <span class='keyword'>typename</span> FwdFrom, <a href='#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity__________________________________________'><span class='texttt'>Quantity</span></span></a> From <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdFrom<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> To <span class='texttt'><i >sudo-cast</i></span><span class='parenthesis'>(</span>FwdFrom<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></div></div></div></div><div class='para' id='non.mem.conv-1'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5308'>#</a></div><div class='texpara'><div id='non.mem.conv-1.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#non.mem.conv-1.sentence-1'>.</a></div></div></div></div><div class='para' id='non.mem.conv-2'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5313'>#</a></div><div class='texpara'><div id='non.mem.conv-2.sentence-1' class='sentence'><span class='texttt'>value_<span class='shy'></span>cast</span> is an explicit cast that allows truncation<a class='hidden_link' href='#non.mem.conv-2.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,value_cast'><div id='lib:value_cast,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__________'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQ, <a href='#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='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'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-3'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5324'>#</a></div><div class='texpara'><div id='non.mem.conv-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, ToU<span class='parenthesis'>)</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast_'><div id='lib:value_cast,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation____________________'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQ, <a href='#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='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'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-4'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5342'>#</a></div><div class='texpara'><div id='non.mem.conv-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast__'><div id='lib:value_cast,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___________'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_____________________'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQ,
<a href='#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='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'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>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.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation______________________'><span class='texttt'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit____________'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQ,
<a href='#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='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'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-5'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5363'>#</a></div><div class='texpara'><div id='non.mem.conv-5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, ToU<span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='para' id='non.mem.conv-6'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5371'>#</a></div><div class='texpara'><div id='non.mem.conv-6.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'><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_____________'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast___'><div id='lib:value_cast,quantity___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:Quantity' title='5.6.3&emsp;Class template quantity&emsp;[qty.syn]'><span id='conceptref:Quantity__________________________________________________'><span class='texttt'>Quantity</span></span></a> ToQ, <span class='keyword'>typename</span> FwdQ, <a href='#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='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'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToQ<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>ToQ<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> Q<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQ<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-7'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5389'>#</a></div><div class='texpara'><div id='non.mem.conv-7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to: <span class='texttt'><span class='keyword'>return</span> <span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>ToQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</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><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='non.mem.conv-8'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-8'>8</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5394'>#</a></div><div class='texpara'><div id='non.mem.conv-8.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>cast</span> is an explicit cast that allows converting to more specific quantities<a class='hidden_link' href='#non.mem.conv-8.sentence-1'>.</a></div> <div id='non.mem.conv-example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#non.mem.conv-example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>auto</span> length <span class='operator'>=</span> isq<span class='operator'>::</span>length<span class='parenthesis'>(</span><span class='literal'>42</span> <span class='operator'>*</span> m<span class='parenthesis'>)</span>;
<span class='keyword'>auto</span> distance <span class='operator'>=</span> quantity_cast<span class='anglebracket'>&lt;</span>isq<span class='operator'>::</span>distance<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>length<span class='parenthesis'>)</span>;
</span>&nbsp;<i>end example</i>]</div></div></div></div><div class='texpara'><div id='lib:quantity,quantity_cast'><div id='lib:quantity_cast,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_cast,quantity'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> ToQS, <span class='keyword'>typename</span> FwdQ, <a href='#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='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'>requires</span> <a class='index' id='conceptref:QuantitySpecCastableTo'></a><span class='texttt'><i >QuantitySpecCastableTo</i></span><span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>quantity_spec, ToQS<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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> quantity_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-9'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5411'>#</a></div><div class='texpara'><div id='non.mem.conv-9.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity<span class='curlybracket'>{</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='operator'>.</span><i >numerical-value</i>, <i >make-reference</i><span class='parenthesis'>(</span>ToQS, Q<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='curlybracket'>}</span>;
</span></div></div></div></div></div><div id='common.type' class='section'><h3 ><a class='secnum' href='#common.type' style='min-width:80pt'>5.6.16</a> <span class='texttt'>std&#x200b;::&#x200b;common_<span class='shy'></span>type</span> specializations <a class='abbr_ref' href='qty.common.type.html'>[qty.common.type]</a></h3><div class='texpara'><span class='codeblock'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</span><a href='#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> Q1, mp_units<span class='operator'>::</span><a href='#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> Q2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='curlybracket'>{</span> mp_units<span class='operator'>::</span>get_common_reference<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> mp_units<span class='operator'>::</span>Reference;
<span class='keyword'>typename</span> std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf______________'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>,
mp_units<span class='operator'>::</span>get_common_quantity_spec<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>quantity_spec,
Q2<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q1, Q2<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> type <span class='operator'>=</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</span>get_common_reference<span class='parenthesis'>(</span>Q1<span class='operator'>::</span>reference, Q2<span class='operator'>::</span>reference<span class='parenthesis'>)</span>,
std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q1<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q2<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>mp_units<span class='operator'>::</span><a href='#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, mp_units<span class='operator'>::</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_______________________'><span class='tcode_in_codeblock'>Representation</span></span></a> Value<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Q<span class='operator'>::</span>unit <span class='operator'>=</span><span class='operator'>=</span> mp_units<span class='operator'>::</span>one<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Value<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <a class='index' id='lib:std::common_type,quantity_'></a>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>Q, Value<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span>
<span class='keyword'>using</span> type <span class='operator'>=</span> mp_units<span class='operator'>::</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, std<span class='operator'>::</span>common_type_t<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q<span class='operator'>::</span>rep, Value<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</span></div></div></div></body></html>

View File

@ -1,8 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.imag.cpo]</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.imag.cpo'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html#qty.imag.cpo'>[qty.rep.cpos]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.3.3</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;imag</span> <a class='abbr_ref'>[qty.imag.cpo]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3826'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3829'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><div class='texpara'><div id='2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='qty.rep.concepts.html#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.1.sentence-1'>.</a></div></div></li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><div class='texpara'><div id='2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>imag<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>imag<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.2.sentence-1'>.</a></div></div></li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><div class='texpara'><div id='2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>imag<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>imag</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.3.sentence-1'>.</a></div></div></li><li id='2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.4'>(2.4)</a></div><div class='texpara'><div id='2.4.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div></body></html>

View File

@ -1,4 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.is.child.of]</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#qty.is.child.of'>[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#qty.is.child.of'>[qty.spec]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.3.6</a> Hierarchy algorithms <a class='abbr_ref' href='qty.spec.hier.algos.html#qty.is.child.of'>[qty.spec.hier.algos]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.3.6.5</a> Is child of <a class='abbr_ref'>[qty.is.child.of]</a></h4><div class='texpara'><div id='lib:is-child-of,QuantitySpec'><div id='lib:QuantitySpec,is-child-of'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:QuantitySpec,is-child-of'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> Child, <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='texttt'>QuantitySpec</span></span></a> Parent<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >is-child-of</i></span><span class='parenthesis'>(</span>Child ch, Parent p<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2262'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: If <span class='math'><span class='mathalpha'>h</span>(<span class='texttt'>p</span>)</span> has more elements than <span class='math'><span class='mathalpha'>h</span>(<span class='texttt'>ch</span>)</span>, returns <span class='texttt'><span class='literal'>false</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>Otherwise, let <span class='math'><span class='mathalpha'>C</span></span> be a tuple of the last <span class='math'><span class='mathalpha'>s</span></span> elements of <span class='math'><span class='mathalpha'>h</span>(<span class='texttt'>ch</span>)</span>,
where <span class='math'><span class='mathalpha'>s</span></span> is the number of elements in <span class='math'><span class='mathalpha'>h</span>(<span class='texttt'>p</span>)</span><a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='1.sentence-3' class='sentence'>Returns <span class='texttt'><span class="mjx-chtml"><span class="mjx-math"><span class="mjx-mrow" aria-hidden="true"><span class="mjx-msubsup"><span class="mjx-base" style="margin-right: -0.045em;"><span class="mjx-mi"><span class="mjx-char MJXc-TeX-math-I" style="padding-top: 0.519em; padding-bottom: 0.298em; padding-right: 0.045em;">C</span></span></span><span class="mjx-sub" style="font-size: 70.7%; vertical-align: -0.212em; padding-right: 0.071em;"><span class="mjx-mn"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.372em; padding-bottom: 0.372em;">0</span></span></span></span></span></span></span> <span class='operator'>=</span><span class='operator'>=</span> p</span><a class='hidden_link' href='#1.sentence-3'>.</a></div></div></div></div></div></body></html>

View File

@ -1,20 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.like]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#like'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.2</a> Interoperability <a class='abbr_ref'>[qty.like]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4070'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The interfaces specified in this subclause and subclause <a href='qty.pt.like.html' title='5.7.3&emsp;Interoperability'>[qty.<span class='shy'></span>pt.<span class='shy'></span>like]</a>
are used by <span class='texttt'>quantity</span> and <span class='texttt'>quantity_<span class='shy'></span>point</span>
to specify conversions with other types representing quantities<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#note-1'>1</a></i>:&ensp;<div id='1.sentence-2' class='sentence'><a href='qty.chrono.html' title='5.9&emsp;std&#x200b;::&#x200b;chrono interoperability'>[qty.<span class='shy'></span>chrono]</a> implements them for <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>chrono<span class='operator'>&#x200b;::&#x200b;</span>duration</span> and <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>chrono<span class='operator'>&#x200b;::&#x200b;</span>time_<span class='shy'></span>point</span><a class='hidden_link' href='#1.sentence-2'>.</a></div>&nbsp;<i>end note</i>]</div></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'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span><span class='anglebracket'>&gt;</span> <span class='keyword'>typename</span> Traits<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >qty-like-impl</i></span><a class='index' id='concept:qty-like-impl'></a> <span class='operator'>=</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> T<span class='operator'>&amp;</span> qty, <span class='keyword'>const</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='operator'>&amp;</span> num<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>{</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>qty<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>num<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='parenthesis'>)</span>, <span class='keyword'>const</span> <span class='keyword'>bool</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>requires</span> std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export<span class='parenthesis'>)</span>, <span class='keyword'>const</span> <span class='keyword'>bool</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>typename</span> std<span class='operator'>::</span>bool_constant<span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='anglebracket'>&gt;</span>;
<span class='keyword'>typename</span> std<span class='operator'>::</span>bool_constant<span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_export<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityLike' title='5.6.2&emsp;Interoperability&emsp;[qty.like]'><span id='concept:QuantityLike'><span id='lib:QuantityLike'><span class='texttt'>QuantityLike</span></span></span></a> <span class='operator'>=</span> <span class='operator'>!</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='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:qty-like-impl'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>T, quantity_like_traits<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> quantity<span class='anglebracket'>&lt;</span>quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference, <span class='keyword'>typename</span> quantity_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4095'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>In the following descriptions, let
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>like_<span class='shy'></span>traits</span> or <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits</span>,</li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><span class='texttt'>Q</span> be a type for which <span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span></span> is specialized,</li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><span class='texttt'>qty</span> be an lvalue of type <span class='texttt'><span class='keyword'>const</span> Q</span>, and</li><li id='2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.4'>(2.4)</a></div><span class='texttt'>num</span> be an lvalue of type <span class='texttt'><span class='keyword'>const</span> Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>rep</span><a class='hidden_link' href='#2.sentence-1'>.</a></li></ul></div></div></div><div class='para' id='3'><div class='marginalizedparent'><a class='marginalized' href='#3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4108'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><span class='texttt'>Q</span> models <span class='texttt'><a class='index' id='conceptref:qty-like-impl_'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>Traits<span class='anglebracket'>&gt;</span></span> if and only if:
<ul class='itemize'><li id='3.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#3.1'>(3.1)</a></div><div class='texpara'><div id='3.1.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>to_<span class='shy'></span>numerical_<span class='shy'></span>value<span class='parenthesis'>(</span>qty<span class='parenthesis'>)</span></span> returns the numerical value (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>) of <span class='texttt'>qty</span><a class='hidden_link' href='#3.1.sentence-1'>.</a></div></div></li><li id='3.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#3.2'>(3.2)</a></div><div class='texpara'><div id='3.2.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>from_<span class='shy'></span>numerical_<span class='shy'></span>value<span class='parenthesis'>(</span>num<span class='parenthesis'>)</span></span> returns a <span class='texttt'>Q</span> with numerical value <span class='texttt'>num</span><a class='hidden_link' href='#3.2.sentence-1'>.</a></div></div></li><li id='3.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#3.3'>(3.3)</a></div><div class='texpara'><div id='3.3.sentence-1' class='sentence'>If <span class='texttt'>Traits</span> is <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits</span>,
both numerical values are offset from <span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>point_<span class='shy'></span>origin</span><a class='hidden_link' href='#3.3.sentence-1'>.</a></div></div></li></ul></div></div></div><div class='para' id='4'><div class='marginalizedparent'><a class='marginalized' href='#4'>4</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4120'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'>If the following expression is <span class='texttt'><span class='literal'>true</span></span>, the specified conversion will be explicit<a class='hidden_link' href='#4.sentence-1'>.</a></div> <ul class='itemize'><li id='4.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#4.1'>(4.1)</a></div><div class='texpara'><div id='4.1.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>explicit_<span class='shy'></span>import</span> for the conversion from <span class='texttt'>Q</span> to this library's type<a class='hidden_link' href='#4.1.sentence-1'>.</a></div></div></li><li id='4.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#4.2'>(4.2)</a></div><div class='texpara'><div id='4.2.sentence-1' class='sentence'><span class='texttt'>Traits<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='operator'>&#x200b;::&#x200b;</span>explicit_<span class='shy'></span>export</span> for the conversion from this library's type to <span class='texttt'>Q</span><a class='hidden_link' href='#4.2.sentence-1'>.</a></div></div></li></ul></div></div></div></body></html>

View File

@ -1,12 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.mag.cpo]</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.mag.cpo'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html#qty.mag.cpo'>[qty.rep.cpos]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.3.5</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;magnitude</span> <a class='abbr_ref'>[qty.mag.cpo]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3884'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3887'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><div class='texpara'><div id='2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='qty.rep.concepts.html#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.1.sentence-1'>.</a></div></div></li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><div class='texpara'><div id='2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>magnitude<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>magnitude<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.2.sentence-1'>.</a></div></div></li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><div class='texpara'><div id='2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>magnitude<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.3.sentence-1'>.</a></div></div></li><li id='2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.4'>(2.4)</a></div><div class='texpara'><div id='2.4.sentence-1' class='sentence'>Otherwise, if <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar__'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>&#x200b;E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.4.sentence-1'>.</a></div></div></li><li id='2.5'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.5'>(2.5)</a></div><div class='texpara'><div id='2.5.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>abs<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar___'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.5.sentence-1'>.</a></div></div></li><li id='2.6'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.6'>(2.6)</a></div><div class='texpara'><div id='2.6.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div></body></html>

View File

@ -1,12 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.modulus.cpo]</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.modulus.cpo'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html#qty.modulus.cpo'>[qty.rep.cpos]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.3.4</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;modulus</span> <a class='abbr_ref'>[qty.modulus.cpo]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3851'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3854'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><div class='texpara'><div id='2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='qty.rep.concepts.html#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.1.sentence-1'>.</a></div></div></li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><div class='texpara'><div id='2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>modulus<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>modulus<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.2.sentence-1'>.</a></div></div></li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><div class='texpara'><div id='2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>modulus<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>modulus</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.3.sentence-1'>.</a></div></div></li><li id='2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.4'>(2.4)</a></div><div class='texpara'><div id='2.4.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar__'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.4.sentence-1'>.</a></div></div></li><li id='2.5'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.5'>(2.5)</a></div><div class='texpara'><div id='2.5.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>abs<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar___'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>abs</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.5.sentence-1'>.</a></div></div></li><li id='2.6'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.6'>(2.6)</a></div><div class='texpara'><div id='2.6.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,41 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.non.mem.conv]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#non.mem.conv'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.15</a> Non-member conversions <a class='abbr_ref'>[qty.non.mem.conv]</a></h3><div class='texpara'><div id='lib:sudo-cast,quantity'><div id='lib:quantity,sudo-cast'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity,sudo-cast'>🔗</a></div><code class='itemdeclcode'><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> To, <span class='keyword'>typename</span> FwdFrom, <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> From <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdFrom<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> To <span class='texttt'><i >sudo-cast</i></span><span class='parenthesis'>(</span>FwdFrom<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5308'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5313'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><span class='texttt'>value_<span class='shy'></span>cast</span> is an explicit cast that allows truncation<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,value_cast'><div id='lib:value_cast,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQ, <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='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'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5324'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, ToU<span class='parenthesis'>)</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast_'><div id='lib:value_cast,quantity_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQ, <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='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'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5342'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast__'><div id='lib:value_cast,quantity__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQ,
<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='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'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span>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.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQ,
<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='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'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5363'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <i >sudo-cast</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span><i >make-reference</i><span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, ToU<span class='parenthesis'>)</span>, ToRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>
std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5371'>#</a></div><div class='texpara'><div id='6.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'><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity,value_cast___'><div id='lib:value_cast,quantity___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity___'>🔗</a></div><code class='itemdeclcode'><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> ToQ, <span class='keyword'>typename</span> FwdQ, <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='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'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference, ToQ<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>ToQ<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> Q<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQ<span class='operator'>::</span>rep, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</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> value_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5389'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to: <span class='texttt'><span class='keyword'>return</span> <span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>ToQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</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><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5394'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>cast</span> is an explicit cast that allows converting to more specific quantities<a class='hidden_link' href='#8.sentence-1'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>auto</span> length <span class='operator'>=</span> isq<span class='operator'>::</span>length<span class='parenthesis'>(</span><span class='literal'>42</span> <span class='operator'>*</span> m<span class='parenthesis'>)</span>;
<span class='keyword'>auto</span> distance <span class='operator'>=</span> quantity_cast<span class='anglebracket'>&lt;</span>isq<span class='operator'>::</span>distance<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>length<span class='parenthesis'>)</span>;
</span>&nbsp;<i>end example</i>]</div></div></div></div><div class='texpara'><div id='lib:quantity,quantity_cast'><div id='lib:quantity_cast,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_cast,quantity'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> ToQS, <span class='keyword'>typename</span> FwdQ, <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='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'>requires</span> <a class='index' id='conceptref:QuantitySpecCastableTo'></a><span class='texttt'><i >QuantitySpecCastableTo</i></span><span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>quantity_spec, ToQS<span class='anglebracket'>&gt;</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> quantity_cast<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5411'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity<span class='curlybracket'>{</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='operator'>.</span><i >numerical-value</i>, <i >make-reference</i><span class='parenthesis'>(</span>ToQS, Q<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='curlybracket'>}</span>;
</span></div></div></div></div></div></body></html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.obs]</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.6</a> Quantity <a class='abbr_ref' href='qty.html#obs'>[qty]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.6.7</a> Numerical value observers <a class='abbr_ref'>[qty.obs]</a></h3><div class='texpara'><div id='lib:quantity,numerical_value_ref_in'><div id='lib:numerical_value_ref_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:numerical_value_ref_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='texttt'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='texttt'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>equivalent<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> rep<span class='operator'>&amp;</span> numerical_value_ref_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4695'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >numerical-value</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity,numerical_value_in'><div id='lib:numerical_value_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:numerical_value_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantityConvertibleTo'></a><span class='texttt'><i >QuantityConvertibleTo</i></span><span class='anglebracket'>&lt;</span>quantity, quantity<span class='anglebracket'>&lt;</span><span class='texttt'><i >make-reference</i></span><span class='parenthesis'>(</span>quantity_spec, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> rep numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4708'>#</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> <span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span><span class='operator'>.</span>in<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div><div class='texpara'><div id='lib:quantity,force_numerical_value_in'><div id='lib:force_numerical_value_in,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:force_numerical_value_in,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith_'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity q<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> value_cast<span class='anglebracket'>&lt;</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>constexpr</span> rep force_numerical_value_in<span class='parenthesis'>(</span>U<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='keyword'>noexcept</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4722'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='parenthesis'>(</span><span class='operator'>*</span><span class='keyword'>this</span><span class='parenthesis'>)</span><span class='operator'>.</span>force_<span class='shy'></span>in<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><span class='texttt'><i >numerical-value</i></span>;</span></div></div></div></div></div></body></html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.point]</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#qty.point'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.14</a> Construction helper <span class='texttt'>point</span> <a class='abbr_ref'>[qty.point]</a></h3><div class='texpara'><span id='lib:point'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:point'>🔗</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.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> point_ <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, default_point_origin<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:point_,operator()'><div id='lib:operator(),point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator(),point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, default_point_origin<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6503'>#</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>quantity<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;</span></div></div></div></div></div></body></html>

View File

@ -1,18 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.prefixed.unit]</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#qty.prefixed.unit'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.4</a> Unit <a class='abbr_ref' href='qty.unit.html#qty.prefixed.unit'>[qty.unit]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.4.4.5</a> Types <a class='abbr_ref' href='qty.unit.types.html#qty.prefixed.unit'>[qty.unit.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.4.4.5.4</a> Prefixed <a class='abbr_ref'>[qty.prefixed.unit]</a></h4><div class='texpara'><span id='lib:prefixed_unit'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:prefixed_unit'>🔗</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>symbol_text Symbol, <a href='qty.unit.mag.concepts.html#concept:UnitMagnitude' title='5.4.4.2.2&emsp;Concepts&emsp;[qty.unit.mag.concepts]'><span id='conceptref:UnitMagnitude'><span class='tcode_in_codeblock'>UnitMagnitude</span></span></a> <span class='keyword'>auto</span> M, <a href='qty.unit.concepts.html#concept:PrefixableUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:PrefixableUnit'><span class='tcode_in_codeblock'>PrefixableUnit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>Symbol<span class='operator'>.</span>empty<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>struct</span> prefixed_unit <span class='operator'>:</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span>M <span class='operator'>*</span> U<span class='parenthesis'>)</span><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> prefixed_unit; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <i >symbol</i> <span class='operator'>=</span> Symbol <span class='operator'>+</span> U<span class='operator'>.</span><i >symbol</i>; <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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L2777'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>prefixed_<span class='shy'></span>unit<span class='anglebracket'>&lt;</span>Symbol, M, U<span class='anglebracket'>&gt;</span></span> represents the unit <span class='texttt'>U</span> with a unit prefix (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-26">IEC 60050, 112-01-26</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'><span class='texttt'>Symbol</span> is the symbol of the unit prefix<a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='1.sentence-3' class='sentence'><span class='texttt'>M</span> is the factor of the unit prefix<a class='hidden_link' href='#1.sentence-3'>.</a></div> <div id='1.sentence-4' class='sentence'>A specialization of <span class='texttt'>prefixed_<span class='shy'></span>unit</span> is used as a base type when defining a unit prefix<a class='hidden_link' href='#1.sentence-4'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:PrefixableUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:PrefixableUnit_'><span class='tcode_in_codeblock'>PrefixableUnit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> kilo_ <span class='operator'>:</span> prefixed_unit<span class='anglebracket'>&lt;</span><span class='literal'>"k"</span>, mag_power<span class='anglebracket'>&lt;</span><span class='literal'>10</span>, <span class='literal'>3</span><span class='anglebracket'>&gt;</span>, U<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:PrefixableUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:PrefixableUnit__'><span class='tcode_in_codeblock'>PrefixableUnit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> kilo_<span class='anglebracket'>&lt;</span>U<span class='anglebracket'>&gt;</span> kilo;
<span class='keyword'>inline</span> <span class='keyword'>constexpr</span> <span class='keyword'>auto</span> kilogram <span class='operator'>=</span> kilo<span class='anglebracket'>&lt;</span>si<span class='operator'>::</span>gram<span class='anglebracket'>&gt;</span>;
</span>&nbsp;<i>end example</i>]</div></div></div></div></div></body></html>

View File

@ -1,51 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.arith.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#arith.ops'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.12</a> Arithmetic operations <a class='abbr_ref'>[qty.pt.arith.ops]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6324'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator-'><div id='lib:operator-,quantity'><div id='lib:quantity_point,operator-'><div id='lib:operator-,quantity_point'><div id='lib:quantity,operator+'><div id='lib:operator+,quantity'><div id='lib:quantity_point,operator+'><div id='lib:operator+,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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><span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6345'>#</a></div><div class='texpara'><div id='2.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-specialization-of</i><span class='anglebracket'>&lt;</span>PO, zeroth_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span>qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q<span class='curlybracket'>}</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span>qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q, PO<span class='curlybracket'>}</span>;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6355'>#</a></div><div class='texpara'><div id='3.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.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>R2<span class='parenthesis'>)</span>, PO<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='keyword'>requires</span> <span class='curlybracket'>{</span>
qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q;
<span class='curlybracket'>}</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,operator-_'><div id='lib:operator-,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6373'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span> rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span>
<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>point_origin <span class='operator'>-</span> rhs<span class='operator'>.</span>point_origin<span class='parenthesis'>)</span>;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6381'>#</a></div><div class='texpara'><div id='5.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span> rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6388'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Recommended practice</i>: The subtraction of two equal origins is not evaluated<a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:PointOrigin,operator-'><div id='lib:operator-,PointOrigin'><div id='lib:quantity_point,operator-__'><div id='lib:operator-,quantity_point__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,quantity_point__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <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'>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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, PO2 po<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <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'>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>PO2 po, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6405'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Effects</i>: For the first signature,
equivalent to:
<span class='codeblock'><span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> po<span class='parenthesis'>)</span>
<span class='keyword'>return</span> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<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,
<span class='operator'>::</span>mp_units<span class='operator'>::</span>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> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span> <span class='parenthesis'>(</span>qp<span class='operator'>.</span>point_origin <span class='operator'>-</span> qp<span class='operator'>.</span>absolute_point_origin<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span> <span class='keyword'>else</span> <span class='curlybracket'>{</span>
<span class='keyword'>return</span> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span>
po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span>
<span class='parenthesis'>(</span>qp<span class='operator'>.</span>point_origin <span class='operator'>-</span> po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>point_origin<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></div> <div id='7.sentence-2' class='sentence'>
For the second signature,
equivalent to: <span class='texttt'><span class='keyword'>return</span> <span class='operator'>-</span><span class='parenthesis'>(</span>qp <span class='operator'>-</span> po<span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6424'>#</a></div><div class='texpara'><div id='8.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.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_point, PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</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>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, PO2<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6432'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><i >Recommended practice</i>: The subtraction of two equal origins is not evaluated<a class='hidden_link' href='#9.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,11 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.assign.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#assign.ops'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.11</a> Compound assignment operations <a class='abbr_ref'>[qty.pt.assign.ops]</a></h3><div class='texpara'><div id='lib:quantity,operator-='><div id='lib:operator-=,quantity'><div id='lib:quantity_point,operator-='><div id='lib:operator-=,quantity_point'><div id='lib:quantity,operator+='><div id='lib:operator+=,quantity'><div id='lib:quantity_point,operator+='><div id='lib:operator+=,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+=,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6301'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6304'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>qp<span class='operator'>.</span><span class='texttt'><i >quantity-from-origin</i></span> @ q</span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6309'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6313'>#</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 class='index' id='conceptref:QuantityConvertibleTo'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> qp<span class='operator'>.</span><i >quantity-from-origin</i> @ q; <span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,16 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.cmp]</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#cmp'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.13</a> Comparison <a class='abbr_ref'>[qty.pt.cmp]</a></h3><div class='texpara'><div id='lib:quantity_point,operator<=>'><div id='lib:operator<=>,quantity_point'><div id='lib:quantity_point,operator=='><div id='lib:operator==,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6451'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span>, and
let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6457'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> lhs <span class='operator'>-</span> lhs<span class='operator'>.</span>absolute_point_origin @ rhs <span class='operator'>-</span> rhs<span class='operator'>.</span>absolute_point_origin;
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6464'>#</a></div><div class='texpara'><div id='3.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'><i >C</i><span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP2<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6471'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Recommended practice</i>: If the origins are equal, instead evaluate
<span class='codeblock'>lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,34 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.cons]</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#cons'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.6</a> Constructors <a class='abbr_ref'>[qty.pt.cons]</a></h3><div class='texpara'><div id='lib:quantity_point,constructor'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>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><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5983'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>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></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> 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> PO2,
<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>PO2<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:SameAbsolutePointOriginAs'></a><span class='texttt'><i >SameAbsolutePointOriginAs</i></span><span class='anglebracket'>&lt;</span>PO2, PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO2<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5997'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>quantity_point<span class='parenthesis'>(</span>quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO2<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='curlybracket'>{</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>,
PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type, quantity_type<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6015'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: If <span class='texttt'>point_<span class='shy'></span>origin <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>&#x200b;::&#x200b;</span>point_<span class='shy'></span>origin</span> is <span class='texttt'><span class='literal'>true</span></span>,
initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>qp<span class='operator'>.</span>quantity_<span class='shy'></span>ref_<span class='shy'></span>from<span class='parenthesis'>(</span>point_<span class='shy'></span>origin<span class='parenthesis'>)</span></span><a class='hidden_link' href='#3.sentence-1'>.</a></div> <div id='3.sentence-2' class='sentence'>Otherwise, initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>qp <span class='operator'>-</span> point_<span class='shy'></span>origin</span><a class='hidden_link' href='#3.sentence-2'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike'><span class='texttt'>QuantityPointLike</span></span></a> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6030'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'>Let <span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#4.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6033'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >quantity-from-origin</i></span> with
<span class='codeblock'>Traits<span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>Traits<span class='operator'>::</span>reference<span class='parenthesis'>)</span>
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6040'>#</a></div><div class='texpara'><div id='6.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'><span class='parenthesis'>(</span>Traits<span class='operator'>::</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span>
</span></div> <div id='6.sentence-2' class='sentence'>
The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>Traits<span class='operator'>::</span>explicit_import <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,38 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.conv]</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#conv'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.7</a> Conversions <a class='abbr_ref'>[qty.pt.conv]</a></h3><div class='texpara'><div id='lib:quantity_point,point_for'><div id='lib:point_for,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:point_for,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SameAbsolutePointOriginAs'></a><span class='texttt'><i >SameAbsolutePointOriginAs</i></span><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> NewPO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span><span class='parenthesis'>(</span>NewPO<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> point_for<span class='parenthesis'>(</span>NewPO new_origin<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6063'>#</a></div><div class='texpara'><div id='1.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>std<span class='operator'>::</span>is_same_v<span class='anglebracket'>&lt;</span>NewPO, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <span class='operator'>*</span><span class='keyword'>this</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span> <span class='operator'>-</span> new_origin, new_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,force_in'><div id='lib:force_in,quantity_point'><div id='lib:quantity_point,in'><div id='lib:in,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf____'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_____'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith___'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf______'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6105'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Let <span class='texttt'><i >converted-quantity-expr</i></span> be an expression denoting
the function call to the corresponding member of <span class='texttt'>quantity_<span class='shy'></span>ref_<span class='shy'></span>from<span class='parenthesis'>(</span>point_<span class='shy'></span>origin<span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6109'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span><i >converted-quantity-expr</i>, point_origin<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6116'>#</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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> <i >converted-quantity-expr</i>; <span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,21 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.conv.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#conv.ops'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.9</a> Conversion operations <a class='abbr_ref'>[qty.pt.conv.ops]</a></h3><div class='texpara'><div id='lib:quantity_point,operator_QuantityPointLike'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,operator_QuantityPointLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike'><span class='texttt'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike_'><span class='texttt'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6195'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Let <span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>Let <span class='texttt'><i >result-expr</i></span> be
<span class='codeblock'>Traits<span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>std<span class='operator'>::</span>move<span class='parenthesis'>(</span><i >quantity-from-origin</i><span class='parenthesis'>)</span><span class='operator'>.</span><i >numerical-value</i><span class='parenthesis'>)</span>
</span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6202'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >result-expr</i></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6206'>#</a></div><div class='texpara'><div id='3.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'><span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> Traits<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity_type, quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
</span></div> <div id='3.sentence-2' class='sentence'>
The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>Traits<span class='operator'>::</span>explicit_export <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity_type, quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
</span></div> <div id='3.sentence-3' class='sentence'>
Let <i >T</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>nothrow_<span class='shy'></span>copy_<span class='shy'></span>constructible_<span class='shy'></span>v</span> for the first signature, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>nothrow_<span class='shy'></span>move_<span class='shy'></span>constructible_<span class='shy'></span>v</span> for the second signature<a class='hidden_link' href='#3.sentence-3'>.</a></div> <div id='3.sentence-4' class='sentence'>The exception specification is equivalent to:
<span class='codeblock'><span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i >result-expr</i><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >T</i><span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.general]</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#general'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.1</a> General <a class='abbr_ref'>[qty.pt.general]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5448'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Subclause <a href='qty.pt.html' title='5.7&emsp;Quantity point'>[qty.<span class='shy'></span>pt]</a> describes the class template <span class='texttt'>quantity_<span class='shy'></span>point</span>
that represents the value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-28">IEC 60050, 112-01-28</a>)
that is an element of an affine space (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-02,102-04-01">IEC 60050, 102-03-02,102-04-01</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,621 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt]</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'>[qty.pt]</a></h2><div id='general' class='section'><h3 ><a class='secnum' href='#general' style='min-width:80pt'>5.7.1</a> General <a class='abbr_ref' href='qty.pt.general.html'>[qty.pt.general]</a></h3><div class='para' id='general-1'><div class='marginalizedparent'><a class='marginalized' href='#general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5448'>#</a></div><div class='texpara'><div id='general-1.sentence-1' class='sentence'>Subclause [qty.<span class='shy'></span>pt] describes the class template <span class='texttt'>quantity_<span class='shy'></span>point</span>
that represents the value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-28">IEC 60050, 112-01-28</a>)
that is an element of an affine space (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-02,102-04-01">IEC 60050, 102-03-02,102-04-01</a>)<a class='hidden_link' href='#general-1.sentence-1'>.</a></div></div></div></div><div id='orig' class='section'><h3 ><a class='secnum' href='#orig' style='min-width:80pt'>5.7.2</a> Point origin <a class='abbr_ref' href='qty.pt.orig.html'>[qty.pt.orig]</a></h3><div id='orig.general' class='section'><h4 ><a class='secnum' href='#orig.general' style='min-width:95pt'>5.7.2.1</a> General <a class='abbr_ref' href='qty.pt.orig.general.html'>[qty.pt.orig.general]</a></h4><div class='para' id='orig.general-1'><div class='marginalizedparent'><a class='marginalized' href='#orig.general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5457'>#</a></div><div class='texpara'><div id='orig.general-1.sentence-1' class='sentence'>This subclause specifies the components
for defining the origin of an affine space<a class='hidden_link' href='#orig.general-1.sentence-1'>.</a></div> <div id='orig.general-1.sentence-2' class='sentence'>An <a class='hidden_link' href='#def:origin' title='5.7.2.1&emsp;General&emsp;[qty.pt.orig.general]'><span id='def:origin'><i >origin</i></span></a> is a point from which measurements (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-04-01">IEC 60050, 112-04-01</a>) take place<a class='hidden_link' href='#orig.general-1.sentence-2'>.</a></div></div></div></div><div id='orig.concepts' class='section'><h4 ><a class='secnum' href='#orig.concepts' style='min-width:95pt'>5.7.2.2</a> Concepts <a class='abbr_ref' href='qty.pt.orig.concepts.html'>[qty.pt.orig.concepts]</a></h4><div class='texpara'><div class='itemdecl' id='orig.concepts-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#orig.concepts-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOrigin'><span id='lib:PointOrigin'><span class='texttt'>PointOrigin</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:SymbolicConstant'></a><span class='texttt'><i >SymbolicConstant</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >point-origin-interface</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOriginFor'><span id='lib:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></span></a> <span class='operator'>=</span> <a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <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='texttt'>QuantitySpecOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>QS<span class='parenthesis'>)</span>, T<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >SameAbsolutePointOriginAs</i></span><a class='index' id='concept:SameAbsolutePointOriginAs'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, V<span class='parenthesis'>)</span>;
</code></div></div></div><div id='orig.types' class='section'><h4 ><a class='secnum' href='#orig.types' style='min-width:95pt'>5.7.2.3</a> Types <a class='abbr_ref' href='qty.pt.orig.types.html'>[qty.pt.orig.types]</a></h4><div id='qty.abs.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.abs.pt.orig' style='min-width:110pt'>5.7.2.3.1</a> Absolute <a class='abbr_ref' href='qty.abs.pt.orig.html'>[qty.abs.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:absolute_point_origin'><a class='hidden_link' href='#lib:absolute_point_origin' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'>absolute_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> QS; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.abs.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.abs.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5491'>#</a></div><div class='texpara'><div id='qty.abs.pt.orig-1.sentence-1' class='sentence'>An <a class='hidden_link' href='#def:origin,absolute' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'><span id='def:origin,absolute'><i >absolute origin</i></span></a> is an origin
chosen by convention and not defined in terms of another origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-1'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining an absolute origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-2'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-3' class='sentence'><span class='texttt'>QS</span> is the quantity the origin represents<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-3'>.</a></div></div></div></div><div id='qty.rel.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.rel.pt.orig' style='min-width:110pt'>5.7.2.3.2</a> Relative <a class='abbr_ref' href='qty.rel.pt.orig.html'>[qty.rel.pt.orig]</a></h4><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><a href='#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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:relative_point_origin'><a class='hidden_link' href='#lib:relative_point_origin' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'>relative_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='#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> <i >quantity-point</i> <span class='operator'>=</span> QP; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='#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> <span class='keyword'>auto</span> <i >absolute-point-origin</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
QP<span class='operator'>.</span>absolute_point_origin;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.rel.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5513'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-1.sentence-1' class='sentence'>A <a class='hidden_link' href='#def:origin,relative' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'><span id='def:origin,relative'><i >relative origin</i></span></a> is an origin
of a subspace (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-03">IEC 60050, 102-03-03</a>)<a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-1'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>relative_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining a relative origin <i >O</i><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-2'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-3' class='sentence'><i >O</i> is offset from <span class='texttt'>QP<span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> by <span class='texttt'>QP<span class='operator'>.</span>quantity_<span class='shy'></span>from_<span class='shy'></span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-3'>.</a></div></div></div><div class='para' id='qty.rel.pt.orig-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5519'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-2.sentence-1' class='sentence'>The member <span class='texttt'><i >quantity-spec</i></span> is equal to
<span class='texttt'>QP<span class='operator'>.</span>point_<span class='shy'></span>origin<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> if
<span class='codeblock'><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>.</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
</span>
is satisfied, and
to <span class='texttt'>QP<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> otherwise<a class='hidden_link' href='#qty.rel.pt.orig-2.sentence-1'>.</a></div></div></div></div><div id='qty.zeroth.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.zeroth.pt.orig' style='min-width:110pt'>5.7.2.3.3</a> Zeroth <a class='abbr_ref' href='qty.zeroth.pt.orig.html'>[qty.zeroth.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:zeroth_point_origin_'><a class='hidden_link' href='#lib:zeroth_point_origin_' title='5.7.2.3.3&emsp;Zeroth&emsp;[qty.zeroth.pt.orig]'>zeroth_point_origin_</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> absolute_point_origin<span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.zeroth.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.zeroth.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5539'>#</a></div><div class='texpara'><div id='qty.zeroth.pt.orig-1.sentence-1' class='sentence'><span class='texttt'>zeroth_<span class='shy'></span>point_<span class='shy'></span>origin_<span class='shy'></span><span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span></span> represents an origin
chosen by convention as the value <span class='math'>0</span> of the quantity <span class='texttt'>QS</span><a class='hidden_link' href='#qty.zeroth.pt.orig-1.sentence-1'>.</a></div></div></div></div></div><div id='orig.ops' class='section'><h4 ><a class='secnum' href='#orig.ops' style='min-width:95pt'>5.7.2.4</a> Operations <a class='abbr_ref' href='qty.pt.orig.ops.html'>[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='#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='#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='#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='#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='#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='#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='#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='#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='#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='orig.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#orig.ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5584'>#</a></div><div class='texpara'><div id='orig.ops-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='#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='#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='orig.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#orig.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5600'>#</a></div><div class='texpara'><div id='orig.ops-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='#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='orig.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#orig.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5614'>#</a></div><div class='texpara'><div id='orig.ops-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='orig.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#orig.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5627'>#</a></div><div class='texpara'><div id='orig.ops-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='#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='#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='orig.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#orig.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5644'>#</a></div><div class='texpara'><div id='orig.ops-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><div id='orig.utils' class='section'><h4 ><a class='secnum' href='#orig.utils' style='min-width:95pt'>5.7.2.5</a> Utilities <a class='abbr_ref' href='qty.pt.orig.utils.html'>[qty.pt.orig.utils]</a></h4><div id='qty.same.abs.pt.origs' class='section'><h4 ><a class='secnum' href='#qty.same.abs.pt.origs' style='min-width:110pt'>5.7.2.5.1</a> Same absolute <a class='abbr_ref' href='qty.same.abs.pt.origs.html'>[qty.same.abs.pt.origs]</a></h4><div class='texpara'><div id='lib:same-absolute-point-origins,PointOrigin'><div id='lib:PointOrigin,same-absolute-point-origins'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:PointOrigin,same-absolute-point-origins'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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='#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'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></div></div></div></div><div class='para' id='qty.same.abs.pt.origs-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.same.abs.pt.origs-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5677'>#</a></div><div class='texpara'><div id='qty.same.abs.pt.origs-1.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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2;
<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 >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</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> po1<span class='operator'>.</span><i >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2;
<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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='literal'>false</span>;
</span></div></div></div></div></div><div id='qty.def.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.def.pt.orig' style='min-width:110pt'>5.7.2.5.2</a> Default <a class='abbr_ref' href='qty.def.pt.orig.html'>[qty.def.pt.orig]</a></h4><div class='texpara'><div id='lib:default_point_origin,Reference'><div id='lib:Reference,default_point_origin'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Reference,default_point_origin'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='qty.def.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.def.pt.orig-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5705'>#</a></div><div class='texpara'><div id='qty.def.pt.orig-1.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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> zeroth_point_origin<span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
</span></div></div></div></div></div></div></div><div id='like' class='section'><h3 ><a class='secnum' href='#like' style='min-width:80pt'>5.7.3</a> Interoperability <a class='abbr_ref' href='qty.pt.like.html'>[qty.pt.like]</a></h3><div class='texpara'><div class='itemdecl' id='concept:QuantityPointLike'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:QuantityPointLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='concept:QuantityPointLike'><span id='lib:QuantityPointLike'><span class='texttt'>QuantityPointLike</span></span></span></a> <span class='operator'>=</span>
<span class='operator'>!</span><a href='#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='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:qty-like-impl'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>T, quantity_point_like_traits<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='comment'>// see <a href='qty.like.html' title='5.6.2&emsp;Interoperability'>[qty.<span class='shy'></span>like]</a></span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> quantity_point<span class='anglebracket'>&lt;</span>quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference,
quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>point_origin,
<span class='keyword'>typename</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div></div><div id='syn' class='section'><h3 ><a class='secnum' href='#syn' style='min-width:80pt'>5.7.4</a> Class template <span class='texttt'>quantity_<span class='shy'></span>point</span> <a class='abbr_ref' href='qty.pt.syn.html'>[qty.pt.syn]</a></h3><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> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPoint' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='concept:QuantityPoint'><span id='lib:QuantityPoint'><span class='tcode_in_codeblock'>QuantityPoint</span></span></span></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>T, quantity_point<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='concept:QuantityPointOf'><span id='lib:QuantityPointOf'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></span></a> <span class='operator'>=</span>
<a href='#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='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><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>QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, V<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<a class='index' id='conceptref:SameAbsolutePointOriginAs__'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>::</span>absolute_point_origin<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, V<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R,
<a href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor_'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> PO <span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> <span id='lib:quantity_point'><a class='hidden_link' href='#lib:quantity_point' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'>quantity_point</a></span> <span class='curlybracket'>{</span>
<span class='keyword'>public</span><span class='operator'>:</span>
<span class='comment'>// member types and values</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> reference <span class='operator'>=</span> R;
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> quantity_spec <span class='operator'>=</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> dimension <span class='operator'>=</span> quantity_spec<span class='operator'>.</span>dimension;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> unit <span class='operator'>=</span> get_unit<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='#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> <span class='keyword'>auto</span> absolute_point_origin <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='#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> <span class='keyword'>auto</span> point_origin <span class='operator'>=</span> PO;
<span class='keyword'>using</span> rep <span class='operator'>=</span> Rep;
<span class='keyword'>using</span> quantity_type <span class='operator'>=</span> quantity<span class='anglebracket'>&lt;</span>reference, Rep<span class='anglebracket'>&gt;</span>;
quantity_type <i >quantity-from-origin</i>; <span class='comment'>// <i >exposition only</i></span>
<span class='comment'>// <a href='#static' title='5.7.5&emsp;Static member functions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>static]</a>, static member functions</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='#cons' title='5.7.6&emsp;Constructors'>[qty.<span class='shy'></span>pt.<span class='shy'></span>cons]</a>, constructors and assignment</span>
quantity_point<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='parenthesis'>(</span>quantity_point<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='operator'>~</span>quantity_point<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>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><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='#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,
<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>PO2<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:SameAbsolutePointOriginAs___'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span>PO2, PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type, quantity_type<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
quantity_point<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>quantity_point<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='comment'>// <a href='#conv' title='5.7.7&emsp;Conversions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>conv]</a>, conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SameAbsolutePointOriginAs____'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> NewPO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span><span class='parenthesis'>(</span>NewPO<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> point_for<span class='parenthesis'>(</span>NewPO new_origin<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf____'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_____'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf______'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith___'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_______'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='comment'>// <a href='#obs' title='5.7.8&emsp;Quantity value observers'>[qty.<span class='shy'></span>pt.<span class='shy'></span>obs]</a>, quantity value observers</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>void</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point qp<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> qp <span class='operator'>-</span> PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='curlybracket'>}</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> quantity_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</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> quantity_from<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='keyword'>const</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> quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='comment'>// <a href='#conv.ops' title='5.7.9&emsp;Conversion operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>conv.<span class='shy'></span>ops]</a>, conversion operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike_'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike__'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#unary.ops' title='5.7.10&emsp;Unary operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>unary.<span class='shy'></span>ops]</a>, unary operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='#assign.ops' title='5.7.11&emsp;Compound assignment operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>assign.<span class='shy'></span>ops]</a>, compound assignment operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable__'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable___'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#arith.ops' title='5.7.12&emsp;Arithmetic operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>arith.<span class='shy'></span>ops]</a>, arithmetic operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#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'>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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, PO2 po<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#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'>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>PO2 po, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='#cmp' title='5.7.13&emsp;Comparison'>[qty.<span class='shy'></span>pt.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</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> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>Q q<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, default_point_origin<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference<span class='parenthesis'>)</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</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> Q, <a href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor__'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> PO<span class='anglebracket'>&gt;</span>
quantity_point<span class='parenthesis'>(</span>Q, PO<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</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'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike___'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP, <span class='keyword'>typename</span> Traits <span class='operator'>=</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>explicit</span><span class='parenthesis'>(</span>quantity_point_like_traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span>QP<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity_point<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, Traits<span class='operator'>::</span>point_origin, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='syn-1'><div class='marginalizedparent'><a class='marginalized' href='#syn-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5928'>#</a></div><div class='texpara'><div id='syn-1.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>point<span class='anglebracket'>&lt;</span>R, PO, Rep<span class='anglebracket'>&gt;</span></span> is a structural type (<a href="https://wg21.link/temp.paramterm.structural.type">N4971, [temp.param]</a>)
if <span class='texttt'>Rep</span> is a structural type<a class='hidden_link' href='#syn-1.sentence-1'>.</a></div></div></div><div class='para' id='syn-2'><div class='marginalizedparent'><a class='marginalized' href='#syn-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5932'>#</a></div><div class='texpara'><div id='syn-2.sentence-1' class='sentence'>The member <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is equal to <span class='texttt'>PO</span> if
<span class='codeblock'><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span>, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>
</span>
is <span class='texttt'><span class='literal'>true</span></span>, and
to <span class='texttt'>PO<span class='operator'>.</span><span class='texttt'><i >quantity-point</i></span><span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> otherwise<a class='hidden_link' href='#syn-2.sentence-1'>.</a></div></div></div></div><div id='static' class='section'><h3 ><a class='secnum' href='#static' style='min-width:80pt'>5.7.5</a> Static member functions <a class='abbr_ref' href='qty.pt.static.html'>[qty.pt.static]</a></h3><div class='texpara'><div id='lib:quantity_point,max'><div id='lib:max,quantity_point'><div id='lib:quantity_point,min'><div id='lib:min,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:min,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='static-1'><div class='marginalizedparent'><a class='marginalized' href='#static-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5952'>#</a></div><div class='texpara'><div id='static-1.sentence-1' class='sentence'>Let <i >F</i> be one of <span class='texttt'>min</span> and <span class='texttt'>max</span><a class='hidden_link' href='#static-1.sentence-1'>.</a></div></div></div></div><div class='para' id='static-2'><div class='marginalizedparent'><a class='marginalized' href='#static-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5955'>#</a></div><div class='texpara'><div id='static-2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='curlybracket'>{</span>quantity_<span class='shy'></span>type<span class='operator'>&#x200b;::&#x200b;</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>, PO<span class='curlybracket'>}</span></span><a class='hidden_link' href='#static-2.sentence-1'>.</a></div></div></div></div><div class='para' id='static-3'><div class='marginalizedparent'><a class='marginalized' href='#static-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5959'>#</a></div><div class='texpara'><div id='static-3.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> quantity_type<span class='operator'>::</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='cons' class='section'><h3 ><a class='secnum' href='#cons' style='min-width:80pt'>5.7.6</a> Constructors <a class='abbr_ref' href='qty.pt.cons.html'>[qty.pt.cons]</a></h3><div class='texpara'><div id='lib:quantity_point,constructor'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>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><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-1'><div class='marginalizedparent'><a class='marginalized' href='#cons-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5983'>#</a></div><div class='texpara'><div id='cons-1.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>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></span><a class='hidden_link' href='#cons-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='#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,
<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>PO2<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:SameAbsolutePointOriginAs_____'></a><span class='texttt'><i >SameAbsolutePointOriginAs</i></span><span class='anglebracket'>&lt;</span>PO2, PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO2<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-2'><div class='marginalizedparent'><a class='marginalized' href='#cons-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5997'>#</a></div><div class='texpara'><div id='cons-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'>quantity_point<span class='parenthesis'>(</span>quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, PO2<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='curlybracket'>{</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span>,
PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf____________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type, quantity_type<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-3'><div class='marginalizedparent'><a class='marginalized' href='#cons-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6015'>#</a></div><div class='texpara'><div id='cons-3.sentence-1' class='sentence'><i >Effects</i>: If <span class='texttt'>point_<span class='shy'></span>origin <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>&#x200b;::&#x200b;</span>point_<span class='shy'></span>origin</span> is <span class='texttt'><span class='literal'>true</span></span>,
initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>qp<span class='operator'>.</span>quantity_<span class='shy'></span>ref_<span class='shy'></span>from<span class='parenthesis'>(</span>point_<span class='shy'></span>origin<span class='parenthesis'>)</span></span><a class='hidden_link' href='#cons-3.sentence-1'>.</a></div> <div id='cons-3.sentence-2' class='sentence'>Otherwise, initializes <span class='texttt'><i >quantity-from-origin</i></span> with <span class='texttt'>qp <span class='operator'>-</span> point_<span class='shy'></span>origin</span><a class='hidden_link' href='#cons-3.sentence-2'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,constructor___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,constructor___'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike____'><span class='texttt'>QuantityPointLike</span></span></a> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='cons-4'><div class='marginalizedparent'><a class='marginalized' href='#cons-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6030'>#</a></div><div class='texpara'><div id='cons-4.sentence-1' class='sentence'>Let <span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#cons-4.sentence-1'>.</a></div></div></div></div><div class='para' id='cons-5'><div class='marginalizedparent'><a class='marginalized' href='#cons-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6033'>#</a></div><div class='texpara'><div id='cons-5.sentence-1' class='sentence'><i >Effects</i>: Initializes <span class='texttt'><i >quantity-from-origin</i></span> with
<span class='codeblock'>Traits<span class='operator'>::</span>to_numerical_value<span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>Traits<span class='operator'>::</span>reference<span class='parenthesis'>)</span>
</span></div></div></div></div><div class='para' id='cons-6'><div class='marginalizedparent'><a class='marginalized' href='#cons-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6040'>#</a></div><div class='texpara'><div id='cons-6.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'><span class='parenthesis'>(</span>Traits<span class='operator'>::</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span>
</span></div> <div id='cons-6.sentence-2' class='sentence'>
The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>Traits<span class='operator'>::</span>explicit_import <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div><div id='conv' class='section'><h3 ><a class='secnum' href='#conv' style='min-width:80pt'>5.7.7</a> Conversions <a class='abbr_ref' href='qty.pt.conv.html'>[qty.pt.conv]</a></h3><div class='texpara'><div id='lib:quantity_point,point_for'><div id='lib:point_for,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:point_for,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SameAbsolutePointOriginAs______'></a><span class='texttt'><i >SameAbsolutePointOriginAs</i></span><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> NewPO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_____________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span><span class='parenthesis'>(</span>NewPO<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> point_for<span class='parenthesis'>(</span>NewPO new_origin<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='conv-1'><div class='marginalizedparent'><a class='marginalized' href='#conv-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6063'>#</a></div><div class='texpara'><div id='conv-1.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>std<span class='operator'>::</span>is_same_v<span class='anglebracket'>&lt;</span>NewPO, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <span class='operator'>*</span><span class='keyword'>this</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span><span class='operator'>*</span><span class='keyword'>this</span> <span class='operator'>-</span> new_origin, new_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,force_in'><div id='lib:force_in,quantity_point'><div id='lib:quantity_point,in'><div id='lib:in,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:in,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith____'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf______________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_____'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_______________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf______'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_____'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith______'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_______'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_______'></a><span class='texttt'><i >UnitCompatibleWith</i></span><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div></div></div><div class='para' id='conv-2'><div class='marginalizedparent'><a class='marginalized' href='#conv-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6105'>#</a></div><div class='texpara'><div id='conv-2.sentence-1' class='sentence'>Let <span class='texttt'><i >converted-quantity-expr</i></span> be an expression denoting
the function call to the corresponding member of <span class='texttt'>quantity_<span class='shy'></span>ref_<span class='shy'></span>from<span class='parenthesis'>(</span>point_<span class='shy'></span>origin<span class='parenthesis'>)</span></span><a class='hidden_link' href='#conv-2.sentence-1'>.</a></div></div></div></div><div class='para' id='conv-3'><div class='marginalizedparent'><a class='marginalized' href='#conv-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6109'>#</a></div><div class='texpara'><div id='conv-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span><i >converted-quantity-expr</i>, point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='para' id='conv-4'><div class='marginalizedparent'><a class='marginalized' href='#conv-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6116'>#</a></div><div class='texpara'><div id='conv-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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> <i >converted-quantity-expr</i>; <span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='obs' class='section'><h3 ><a class='secnum' href='#obs' style='min-width:80pt'>5.7.8</a> Quantity value observers <a class='abbr_ref' href='qty.pt.obs.html'>[qty.pt.obs]</a></h3><div class='texpara'><div id='lib:quantity_point,quantity_ref_from'><div id='lib:quantity_ref_from,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_ref_from,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></div></div></div></div><div class='para' id='obs-1'><div class='marginalizedparent'><a class='marginalized' href='#obs-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6137'>#</a></div><div class='texpara'><div id='obs-1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >quantity-from-origin</i></span><a class='hidden_link' href='#obs-1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_from'><div id='lib:quantity_from,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_from,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point qp<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> qp <span class='operator'>-</span> PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='curlybracket'>}</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> quantity_from<span class='parenthesis'>(</span>PO2 rhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf____________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</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> quantity_from<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='obs-2'><div class='marginalizedparent'><a class='marginalized' href='#obs-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6153'>#</a></div><div class='texpara'><div id='obs-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='operator'>*</span><span class='keyword'>this</span> <span class='operator'>-</span> rhs;</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_from_zero'><div id='lib:quantity_from_zero,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_from_zero,quantity_point'>🔗</a></div><code class='itemdeclcode'><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> quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='obs-3'><div class='marginalizedparent'><a class='marginalized' href='#obs-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6165'>#</a></div><div class='texpara'><div id='obs-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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> unit<span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// can lose the input unit</span>
<span class='keyword'>const</span> <span class='keyword'>auto</span> q <span class='operator'>=</span> quantity_from<span class='parenthesis'>(</span>unit<span class='operator'>.</span><i >point-origin</i><span class='parenthesis'>)</span>;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='keyword'>requires</span> <span class='curlybracket'>{</span> q<span class='operator'>.</span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='comment'>// restore the unit</span>
<span class='keyword'>return</span> q<span class='operator'>.</span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> q;
<span class='curlybracket'>}</span> <span class='keyword'>else</span>
<span class='keyword'>return</span> quantity_from<span class='parenthesis'>(</span>absolute_point_origin<span class='parenthesis'>)</span>;
</span></div></div></div></div></div><div id='conv.ops' class='section'><h3 ><a class='secnum' href='#conv.ops' style='min-width:80pt'>5.7.9</a> Conversion operations <a class='abbr_ref' href='qty.pt.conv.ops.html'>[qty.pt.conv.ops]</a></h3><div class='texpara'><div id='lib:quantity_point,operator_QuantityPointLike'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,operator_QuantityPointLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike_____'><span class='texttt'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike______'><span class='texttt'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
</code></div></div></div><div class='para' id='conv.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6195'>#</a></div><div class='texpara'><div id='conv.ops-1.sentence-1' class='sentence'>Let <span class='texttt'>Traits</span> be <span class='texttt'>quantity_<span class='shy'></span>point_<span class='shy'></span>like_<span class='shy'></span>traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#conv.ops-1.sentence-1'>.</a></div> <div id='conv.ops-1.sentence-2' class='sentence'>Let <span class='texttt'><i >result-expr</i></span> be
<span class='codeblock'>Traits<span class='operator'>::</span>from_numerical_value<span class='parenthesis'>(</span>std<span class='operator'>::</span>move<span class='parenthesis'>(</span><i >quantity-from-origin</i><span class='parenthesis'>)</span><span class='operator'>.</span><i >numerical-value</i><span class='parenthesis'>)</span>
</span></div></div></div></div><div class='para' id='conv.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6202'>#</a></div><div class='texpara'><div id='conv.ops-2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >result-expr</i></span><a class='hidden_link' href='#conv.ops-2.sentence-1'>.</a></div></div></div></div><div class='para' id='conv.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#conv.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6206'>#</a></div><div class='texpara'><div id='conv.ops-3.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'><span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> Traits<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity_type, quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
</span></div> <div id='conv.ops-3.sentence-2' class='sentence'>
The expression inside <span class='texttt'><span class='keyword'>explicit</span></span> is equivalent to:
<span class='codeblock'>Traits<span class='operator'>::</span>explicit_export <span class='operator'>|</span><span class='operator'>|</span>
<span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span>quantity_type, quantity<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
</span></div> <div id='conv.ops-3.sentence-3' class='sentence'>
Let <i >T</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>nothrow_<span class='shy'></span>copy_<span class='shy'></span>constructible_<span class='shy'></span>v</span> for the first signature, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>is_<span class='shy'></span>nothrow_<span class='shy'></span>move_<span class='shy'></span>constructible_<span class='shy'></span>v</span> for the second signature<a class='hidden_link' href='#conv.ops-3.sentence-3'>.</a></div> <div id='conv.ops-3.sentence-4' class='sentence'>The exception specification is equivalent to:
<span class='codeblock'><span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i >result-expr</i><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <i >T</i><span class='anglebracket'>&lt;</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div></div><div id='unary.ops' class='section'><h3 ><a class='secnum' href='#unary.ops' style='min-width:80pt'>5.7.10</a> Unary operations <a class='abbr_ref' href='qty.pt.unary.ops.html'>[qty.pt.unary.ops]</a></h3><div class='para' id='unary.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6229'>#</a></div><div class='texpara'><div id='unary.ops-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#unary.ops-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,operator--'><div id='lib:operator--,quantity_point'><div id='lib:quantity_point,operator++'><div id='lib:operator++,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable____'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_____'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='unary.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6245'>#</a></div><div class='texpara'><div id='unary.ops-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>@qp<span class='operator'>.</span><span class='texttt'><i >quantity-from-origin</i></span></span><a class='hidden_link' href='#unary.ops-2.sentence-1'>.</a></div></div></div></div><div class='para' id='unary.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6250'>#</a></div><div class='texpara'><div id='unary.ops-3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span></span><a class='hidden_link' href='#unary.ops-3.sentence-1'>.</a></div></div></div></div><div class='para' id='unary.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6254'>#</a></div><div class='texpara'><div id='unary.ops-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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> @qp<span class='operator'>.</span><i >quantity-from-origin</i>; <span class='curlybracket'>}</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,operator--_'><div id='lib:operator--,quantity_point_'><div id='lib:quantity_point,operator++_'><div id='lib:operator++,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div><div class='para' id='unary.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6272'>#</a></div><div class='texpara'><div id='unary.ops-5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='curlybracket'>{</span><span class='texttt'><i >quantity-from-origin</i></span>@, PO<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='para' id='unary.ops-6'><div class='marginalizedparent'><a class='marginalized' href='#unary.ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6277'>#</a></div><div class='texpara'><div id='unary.ops-6.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> <i >quantity-from-origin</i>@; <span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='assign.ops' class='section'><h3 ><a class='secnum' href='#assign.ops' style='min-width:80pt'>5.7.11</a> Compound assignment operations <a class='abbr_ref' href='qty.pt.assign.ops.html'>[qty.pt.assign.ops]</a></h3><div class='texpara'><div id='lib:quantity,operator-='><div id='lib:operator-=,quantity'><div id='lib:quantity_point,operator-='><div id='lib:operator-=,quantity_point'><div id='lib:quantity,operator+='><div id='lib:operator+=,quantity'><div id='lib:quantity_point,operator+='><div id='lib:operator+=,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+=,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable______'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_______'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></div></div></div></div><div class='para' id='assign.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6301'>#</a></div><div class='texpara'><div id='assign.ops-1.sentence-1' class='sentence'>Let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#assign.ops-1.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6304'>#</a></div><div class='texpara'><div id='assign.ops-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>qp<span class='operator'>.</span><span class='texttt'><i >quantity-from-origin</i></span> @ q</span><a class='hidden_link' href='#assign.ops-2.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6309'>#</a></div><div class='texpara'><div id='assign.ops-3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span></span><a class='hidden_link' href='#assign.ops-3.sentence-1'>.</a></div></div></div></div><div class='para' id='assign.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#assign.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6313'>#</a></div><div class='texpara'><div id='assign.ops-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 class='index' id='conceptref:QuantityConvertibleTo'></a><i >QuantityConvertibleTo</i><span class='anglebracket'>&lt;</span>quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span>, quantity_type<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> qp<span class='operator'>.</span><i >quantity-from-origin</i> @ q; <span class='curlybracket'>}</span>
</span></div></div></div></div></div><div id='arith.ops' class='section'><h3 ><a class='secnum' href='#arith.ops' style='min-width:80pt'>5.7.12</a> Arithmetic operations <a class='abbr_ref' href='qty.pt.arith.ops.html'>[qty.pt.arith.ops]</a></h3><div class='para' id='arith.ops-1'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6324'>#</a></div><div class='texpara'><div id='arith.ops-1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#arith.ops-1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity,operator-'><div id='lib:operator-,quantity'><div id='lib:quantity_point,operator-'><div id='lib:operator-,quantity_point'><div id='lib:quantity,operator+'><div id='lib:operator+,quantity'><div id='lib:quantity_point,operator+'><div id='lib:operator+,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator+,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div></div></div></div></div></div></div><div class='para' id='arith.ops-2'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6345'>#</a></div><div class='texpara'><div id='arith.ops-2.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-specialization-of</i><span class='anglebracket'>&lt;</span>PO, zeroth_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span>qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q<span class='curlybracket'>}</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='operator'>::</span>mp_units<span class='operator'>::</span>quantity_point<span class='curlybracket'>{</span>qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q, PO<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='para' id='arith.ops-3'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6355'>#</a></div><div class='texpara'><div id='arith.ops-3.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.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>R2<span class='parenthesis'>)</span>, PO<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='keyword'>requires</span> <span class='curlybracket'>{</span>
qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span> @ q;
<span class='curlybracket'>}</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,operator-_'><div id='lib:operator-,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_____________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></div></div><div class='para' id='arith.ops-4'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6373'>#</a></div><div class='texpara'><div id='arith.ops-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span> rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span>
<span class='parenthesis'>(</span>lhs<span class='operator'>.</span>point_origin <span class='operator'>-</span> rhs<span class='operator'>.</span>point_origin<span class='parenthesis'>)</span>;
</span></div></div></div></div><div class='para' id='arith.ops-5'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6381'>#</a></div><div class='texpara'><div id='arith.ops-5.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span> rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
</span></div></div></div></div><div class='para' id='arith.ops-6'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6388'>#</a></div><div class='texpara'><div id='arith.ops-6.sentence-1' class='sentence'><i >Recommended practice</i>: The subtraction of two equal origins is not evaluated<a class='hidden_link' href='#arith.ops-6.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:PointOrigin,operator-'><div id='lib:operator-,PointOrigin'><div id='lib:quantity_point,operator-__'><div id='lib:operator-,quantity_point__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator-,quantity_point__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#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'>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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, PO2 po<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#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'>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>PO2 po, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='arith.ops-7'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6405'>#</a></div><div class='texpara'><div id='arith.ops-7.sentence-1' class='sentence'><i >Effects</i>: For the first signature,
equivalent to:
<span class='codeblock'><span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> po<span class='parenthesis'>)</span>
<span class='keyword'>return</span> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<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,
<span class='operator'>::</span>mp_units<span class='operator'>::</span>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> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span> <span class='parenthesis'>(</span>qp<span class='operator'>.</span>point_origin <span class='operator'>-</span> qp<span class='operator'>.</span>absolute_point_origin<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span> <span class='keyword'>else</span> <span class='curlybracket'>{</span>
<span class='keyword'>return</span> qp<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>-</span>
po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>point_origin<span class='parenthesis'>)</span> <span class='operator'>+</span>
<span class='parenthesis'>(</span>qp<span class='operator'>.</span>point_origin <span class='operator'>-</span> po<span class='operator'>.</span><i >quantity-point</i><span class='operator'>.</span>point_origin<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></div> <div id='arith.ops-7.sentence-2' class='sentence'>
For the second signature,
equivalent to: <span class='texttt'><span class='keyword'>return</span> <span class='operator'>-</span><span class='parenthesis'>(</span>qp <span class='operator'>-</span> po<span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='arith.ops-8'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6424'>#</a></div><div class='texpara'><div id='arith.ops-8.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='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf______________________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_point, PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</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>reference<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, PO2<span class='operator'>::</span><i >quantity-spec</i><span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='para' id='arith.ops-9'><div class='marginalizedparent'><a class='marginalized' href='#arith.ops-9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6432'>#</a></div><div class='texpara'><div id='arith.ops-9.sentence-1' class='sentence'><i >Recommended practice</i>: The subtraction of two equal origins is not evaluated<a class='hidden_link' href='#arith.ops-9.sentence-1'>.</a></div></div></div></div></div><div id='cmp' class='section'><h3 ><a class='secnum' href='#cmp' style='min-width:80pt'>5.7.13</a> Comparison <a class='abbr_ref' href='qty.pt.cmp.html'>[qty.pt.cmp]</a></h3><div class='texpara'><div id='lib:quantity_point,operator<=>'><div id='lib:operator<=>,quantity_point'><div id='lib:quantity_point,operator=='><div id='lib:operator==,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_______________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf________________________'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div><div class='para' id='cmp-1'><div class='marginalizedparent'><a class='marginalized' href='#cmp-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6451'>#</a></div><div class='texpara'><div id='cmp-1.sentence-1' class='sentence'>Let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span>, and
let <i >C</i> be
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>equality_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='operator'>=</span><span class='operator'>=</span></span>, and
<span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>three_<span class='shy'></span>way_<span class='shy'></span>comparable_<span class='shy'></span>with</span> if <span class='texttt'>@</span> is <span class='texttt'><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#cmp-1.sentence-1'>.</a></div></div></div></div><div class='para' id='cmp-2'><div class='marginalizedparent'><a class='marginalized' href='#cmp-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6457'>#</a></div><div class='texpara'><div id='cmp-2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> lhs <span class='operator'>-</span> lhs<span class='operator'>.</span>absolute_point_origin @ rhs <span class='operator'>-</span> rhs<span class='operator'>.</span>absolute_point_origin;
</span></div></div></div></div><div class='para' id='cmp-3'><div class='marginalizedparent'><a class='marginalized' href='#cmp-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6464'>#</a></div><div class='texpara'><div id='cmp-3.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'><i >C</i><span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP2<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='para' id='cmp-4'><div class='marginalizedparent'><a class='marginalized' href='#cmp-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6471'>#</a></div><div class='texpara'><div id='cmp-4.sentence-1' class='sentence'><i >Recommended practice</i>: If the origins are equal, instead evaluate
<span class='codeblock'>lhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>point_origin<span class='parenthesis'>)</span> @ rhs<span class='operator'>.</span>quantity_ref_from<span class='parenthesis'>(</span>QP2<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span>
</span></div></div></div></div></div><div id='qty.point' class='section'><h3 ><a class='secnum' href='#qty.point' style='min-width:80pt'>5.7.14</a> Construction helper <span class='texttt'>point</span> <a class='abbr_ref' href='qty.point.html'>[qty.point]</a></h3><div class='texpara'><span id='lib:point'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:point'>🔗</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.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='tcode_in_codeblock'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> point_ <span class='curlybracket'>{</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_________'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, default_point_origin<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></div><div class='texpara'><div id='lib:point_,operator()'><div id='lib:operator(),point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator(),point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, default_point_origin<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></div></div></div></div><div class='para' id='qty.point-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.point-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6503'>#</a></div><div class='texpara'><div id='qty.point-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>quantity<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;</span></div></div></div></div></div><div id='non.mem.conv' class='section'><h3 ><a class='secnum' href='#non.mem.conv' style='min-width:80pt'>5.7.15</a> Non-member conversions <a class='abbr_ref' href='qty.pt.non.mem.conv.html'>[qty.pt.non.mem.conv]</a></h3><div class='texpara'><div id='lib:sudo-cast,quantity_point'><div id='lib:quantity_point,sudo-cast'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,sudo-cast'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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> ToQP, <span class='keyword'>typename</span> FwdFromQP,
<a href='#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> FromQP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdFromQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#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='texttt'><i >sudo-cast</i></span><span class='parenthesis'>(</span>FwdFromQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-1'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6520'>#</a></div><div class='texpara'><div id='non.mem.conv-1.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#non.mem.conv-1.sentence-1'>.</a></div></div></div></div><div class='para' id='non.mem.conv-2'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6525'>#</a></div><div class='texpara'><div id='non.mem.conv-2.sentence-1' class='sentence'><span class='texttt'>value_<span class='shy'></span>cast</span> is an explicit cast that allows truncation<a class='hidden_link' href='#non.mem.conv-2.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast'><div id='lib:value_cast,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQP, <a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-3'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6536'>#</a></div><div class='texpara'><div id='non.mem.conv-3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToU<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast_'><div id='lib:value_cast,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQP, <a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___________'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, QP<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>QP<span class='operator'>::</span>reference, QP<span class='operator'>::</span>point_origin, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-4'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6554'>#</a></div><div class='texpara'><div id='non.mem.conv-4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>, QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast__'><div id='lib:value_cast,quantity_point__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQP,
<a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit___'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQP,
<a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-5'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6575'>#</a></div><div class='texpara'><div id='non.mem.conv-5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToU, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='para' id='non.mem.conv-6'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6583'>#</a></div><div class='texpara'><div id='non.mem.conv-6.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'><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____________'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, QP<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast___'><div id='lib:value_cast,quantity_point___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point___'>🔗</a></div><code class='itemdeclcode'><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> ToQ, <span class='keyword'>typename</span> FwdQP, <a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToQ<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>ToQ<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQ<span class='operator'>::</span>rep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-7'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6601'>#</a></div><div class='texpara'><div id='non.mem.conv-7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast____'><div id='lib:value_cast,quantity_point____'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point____'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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> ToQP, <span class='keyword'>typename</span> FwdQP, <a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToQP<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>ToQP<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>ToQP<span class='operator'>::</span>point_origin, QP<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQP<span class='operator'>::</span>rep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-8'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6621'>#</a></div><div class='texpara'><div id='non.mem.conv-8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>ToQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='non.mem.conv-9'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-9'>9</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6627'>#</a></div><div class='texpara'><div id='non.mem.conv-9.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>cast</span> is an explicit cast that allows converting to more specific quantities<a class='hidden_link' href='#non.mem.conv-9.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_cast'><div id='lib:quantity_cast,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_cast,quantity_point'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> ToQS, <span class='keyword'>typename</span> FwdQP, <a href='#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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantitySpecCastableTo'></a><span class='texttt'><i >QuantitySpecCastableTo</i></span><span class='anglebracket'>&lt;</span>QP<span class='operator'>::</span>quantity_spec, ToQS<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#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> quantity_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='non.mem.conv-10'><div class='marginalizedparent'><a class='marginalized' href='#non.mem.conv-10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6638'>#</a></div><div class='texpara'><div id='non.mem.conv-10.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> QP<span class='curlybracket'>{</span>quantity_cast<span class='anglebracket'>&lt;</span>ToQS<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity_from_origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div></div></div></body></html>

View File

@ -1,10 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.like]</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#like'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.3</a> Interoperability <a class='abbr_ref'>[qty.pt.like]</a></h3><div class='texpara'><div class='itemdecl' id='concept:QuantityPointLike'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:QuantityPointLike'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='concept:QuantityPointLike'><span id='lib:QuantityPointLike'><span class='texttt'>QuantityPointLike</span></span></span></a> <span class='operator'>=</span>
<span class='operator'>!</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='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<a class='index' id='conceptref:qty-like-impl'></a><span class='texttt'><i >qty-like-impl</i></span><span class='anglebracket'>&lt;</span>T, quantity_point_like_traits<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='comment'>// see <a href='qty.like.html' title='5.6.2&emsp;Interoperability'>[qty.<span class='shy'></span>like]</a></span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span>
<span class='keyword'>typename</span> quantity_point<span class='anglebracket'>&lt;</span>quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>reference,
quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>point_origin,
<span class='keyword'>typename</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div></div></body></html>

View File

@ -1,51 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.non.mem.conv]</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#non.mem.conv'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.15</a> Non-member conversions <a class='abbr_ref'>[qty.pt.non.mem.conv]</a></h3><div class='texpara'><div id='lib:sudo-cast,quantity_point'><div id='lib:quantity_point,sudo-cast'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_point,sudo-cast'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</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> ToQP, <span class='keyword'>typename</span> FwdFromQP,
<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> FromQP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdFromQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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='texttt'><i >sudo-cast</i></span><span class='parenthesis'>(</span>FwdFromQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6520'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: TBD<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6525'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><span class='texttt'>value_<span class='shy'></span>cast</span> is an explicit cast that allows truncation<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast'><div id='lib:value_cast,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQP, <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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6536'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToU<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast_'><div id='lib:value_cast,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQP, <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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, QP<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='anglebracket'>&lt;</span>QP<span class='operator'>::</span>reference, QP<span class='operator'>::</span>point_origin, ToRep<span class='anglebracket'>&gt;</span> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6554'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> <span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>, QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast__'><div id='lib:value_cast,quantity_point__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a> ToRep, <span class='keyword'>typename</span> FwdQP,
<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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> ToRep, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit__'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> ToU, <span class='keyword'>typename</span> FwdQP,
<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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6575'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToU, ToRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6583'>#</a></div><div class='texpara'><div id='6.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'><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToU<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>ToRep, QP<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>ToRep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast___'><div id='lib:value_cast,quantity_point___'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point___'>🔗</a></div><code class='itemdeclcode'><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> ToQ, <span class='keyword'>typename</span> FwdQP, <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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToQ<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span>ToQ<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQ<span class='operator'>::</span>rep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6601'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity_point<span class='curlybracket'>{</span>value_cast<span class='anglebracket'>&lt;</span>ToQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity-from-origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,value_cast____'><div id='lib:value_cast,quantity_point____'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:value_cast,quantity_point____'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</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> ToQP, <span class='keyword'>typename</span> FwdQP, <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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>convertible<span class='parenthesis'>(</span>QP<span class='operator'>::</span>reference, ToQP<span class='operator'>::</span>unit<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>ToQP<span class='operator'>::</span>quantity_spec <span class='operator'>=</span><span class='operator'>=</span> QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>ToQP<span class='operator'>::</span>point_origin, QP<span class='operator'>::</span>point_origin<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> ToQP<span class='operator'>::</span>rep, <span class='keyword'>typename</span> QP<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</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> value_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6621'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='texttt'><i >sudo-cast</i></span><span class='anglebracket'>&lt;</span>ToQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;</span></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6627'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>cast</span> is an explicit cast that allows converting to more specific quantities<a class='hidden_link' href='#9.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_cast'><div id='lib:quantity_cast,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_cast,quantity_point'>🔗</a></div><code class='itemdeclcode'><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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> ToQS, <span class='keyword'>typename</span> FwdQP, <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> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a class='index' id='conceptref:QuantitySpecCastableTo'></a><span class='texttt'><i >QuantitySpecCastableTo</i></span><span class='anglebracket'>&lt;</span>QP<span class='operator'>::</span>quantity_spec, ToQS<span class='anglebracket'>&gt;</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> quantity_cast<span class='parenthesis'>(</span>FwdQP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='10'><div class='marginalizedparent'><a class='marginalized' href='#10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6638'>#</a></div><div class='texpara'><div id='10.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> QP<span class='curlybracket'>{</span>quantity_cast<span class='anglebracket'>&lt;</span>ToQS<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<span class='parenthesis'>)</span><span class='operator'>.</span><i >quantity_from_origin</i><span class='parenthesis'>)</span>,
QP<span class='operator'>::</span>point_origin<span class='curlybracket'>}</span>;
</span></div></div></div></div></div></body></html>

View File

@ -1,26 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.obs]</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#obs'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.8</a> Quantity value observers <a class='abbr_ref'>[qty.pt.obs]</a></h3><div class='texpara'><div id='lib:quantity_point,quantity_ref_from'><div id='lib:quantity_ref_from,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_ref_from,quantity_point'>🔗</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</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='texttt'>PointOrigin</span></span></a> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6137'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><i >quantity-from-origin</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_from'><div id='lib:quantity_from,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_from,quantity_point'>🔗</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point qp<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> qp <span class='operator'>-</span> PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='curlybracket'>}</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> quantity_from<span class='parenthesis'>(</span>PO2 rhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.syn.html#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='texttt'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</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> quantity_from<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6153'>#</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> <span class='operator'>*</span><span class='keyword'>this</span> <span class='operator'>-</span> rhs;</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,quantity_from_zero'><div id='lib:quantity_from_zero,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:quantity_from_zero,quantity_point'>🔗</a></div><code class='itemdeclcode'><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> quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6165'>#</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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> unit<span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// can lose the input unit</span>
<span class='keyword'>const</span> <span class='keyword'>auto</span> q <span class='operator'>=</span> quantity_from<span class='parenthesis'>(</span>unit<span class='operator'>.</span><i >point-origin</i><span class='parenthesis'>)</span>;
<span class='keyword'>if</span> <span class='keyword'>constexpr</span> <span class='parenthesis'>(</span><span class='keyword'>requires</span> <span class='curlybracket'>{</span> q<span class='operator'>.</span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='comment'>// restore the unit</span>
<span class='keyword'>return</span> q<span class='operator'>.</span>in<span class='parenthesis'>(</span>unit<span class='parenthesis'>)</span>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> q;
<span class='curlybracket'>}</span> <span class='keyword'>else</span>
<span class='keyword'>return</span> quantity_from<span class='parenthesis'>(</span>absolute_point_origin<span class='parenthesis'>)</span>;
</span></div></div></div></div></div></body></html>

View File

@ -1,10 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig.concepts]</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.concepts'>[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#concepts'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.2</a> Concepts <a class='abbr_ref'>[qty.pt.orig.concepts]</a></h4><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'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOrigin'><span id='lib:PointOrigin'><span class='texttt'>PointOrigin</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:SymbolicConstant'></a><span class='texttt'><i >SymbolicConstant</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >point-origin-interface</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOriginFor'><span id='lib:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></span></a> <span class='operator'>=</span> <a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <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='texttt'>QuantitySpecOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>QS<span class='parenthesis'>)</span>, T<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >SameAbsolutePointOriginAs</i></span><a class='index' id='concept:SameAbsolutePointOriginAs'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, V<span class='parenthesis'>)</span>;
</code></div></div></div></body></html>

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig.general]</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.general'>[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#general'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.1</a> General <a class='abbr_ref'>[qty.pt.orig.general]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5457'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>This subclause specifies the components
for defining the origin of an affine space<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>An <a class='hidden_link' href='#def:origin' title='5.7.2.1&emsp;General&emsp;[qty.pt.orig.general]'><span id='def:origin'><i >origin</i></span></a> is a point from which measurements (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-04-01">IEC 60050, 112-04-01</a>) take place<a class='hidden_link' href='#1.sentence-2'>.</a></div></div></div></div></body></html>

View File

@ -1,135 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig]</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'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.2</a> Point origin <a class='abbr_ref'>[qty.pt.orig]</a></h3><div id='general' class='section'><h4 ><a class='secnum' href='#general' style='min-width:95pt'>5.7.2.1</a> General <a class='abbr_ref' href='qty.pt.orig.general.html'>[qty.pt.orig.general]</a></h4><div class='para' id='general-1'><div class='marginalizedparent'><a class='marginalized' href='#general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5457'>#</a></div><div class='texpara'><div id='general-1.sentence-1' class='sentence'>This subclause specifies the components
for defining the origin of an affine space<a class='hidden_link' href='#general-1.sentence-1'>.</a></div> <div id='general-1.sentence-2' class='sentence'>An <a class='hidden_link' href='#def:origin' title='5.7.2.1&emsp;General&emsp;[qty.pt.orig.general]'><span id='def:origin'><i >origin</i></span></a> is a point from which measurements (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-04-01">IEC 60050, 112-04-01</a>) take place<a class='hidden_link' href='#general-1.sentence-2'>.</a></div></div></div></div><div id='concepts' class='section'><h4 ><a class='secnum' href='#concepts' style='min-width:95pt'>5.7.2.2</a> Concepts <a class='abbr_ref' href='qty.pt.orig.concepts.html'>[qty.pt.orig.concepts]</a></h4><div class='texpara'><div class='itemdecl' id='concepts-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#concepts-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOrigin' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOrigin'><span id='lib:PointOrigin'><span class='texttt'>PointOrigin</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:SymbolicConstant'></a><span class='texttt'><i >SymbolicConstant</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >point-origin-interface</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='concept:PointOriginFor'><span id='lib:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></span></a> <span class='operator'>=</span> <a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <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='texttt'>QuantitySpecOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>QS<span class='parenthesis'>)</span>, T<span class='operator'>::</span><span class='texttt'><i >quantity-spec</i></span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >SameAbsolutePointOriginAs</i></span><a class='index' id='concept:SameAbsolutePointOriginAs'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<a href='#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><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a href='#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><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, V<span class='parenthesis'>)</span>;
</code></div></div></div><div id='types' class='section'><h4 ><a class='secnum' href='#types' style='min-width:95pt'>5.7.2.3</a> Types <a class='abbr_ref' href='qty.pt.orig.types.html'>[qty.pt.orig.types]</a></h4><div id='qty.abs.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.abs.pt.orig' style='min-width:110pt'>5.7.2.3.1</a> Absolute <a class='abbr_ref' href='qty.abs.pt.orig.html'>[qty.abs.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:absolute_point_origin'><a class='hidden_link' href='#lib:absolute_point_origin' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'>absolute_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> QS; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.abs.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.abs.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5491'>#</a></div><div class='texpara'><div id='qty.abs.pt.orig-1.sentence-1' class='sentence'>An <a class='hidden_link' href='#def:origin,absolute' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'><span id='def:origin,absolute'><i >absolute origin</i></span></a> is an origin
chosen by convention and not defined in terms of another origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-1'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining an absolute origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-2'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-3' class='sentence'><span class='texttt'>QS</span> is the quantity the origin represents<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-3'>.</a></div></div></div></div><div id='qty.rel.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.rel.pt.orig' style='min-width:110pt'>5.7.2.3.2</a> Relative <a class='abbr_ref' href='qty.rel.pt.orig.html'>[qty.rel.pt.orig]</a></h4><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><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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:relative_point_origin'><a class='hidden_link' href='#lib:relative_point_origin' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'>relative_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</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> <i >quantity-point</i> <span class='operator'>=</span> QP; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='#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> <span class='keyword'>auto</span> <i >absolute-point-origin</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
QP<span class='operator'>.</span>absolute_point_origin;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.rel.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5513'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-1.sentence-1' class='sentence'>A <a class='hidden_link' href='#def:origin,relative' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'><span id='def:origin,relative'><i >relative origin</i></span></a> is an origin
of a subspace (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-03">IEC 60050, 102-03-03</a>)<a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-1'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>relative_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining a relative origin <i >O</i><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-2'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-3' class='sentence'><i >O</i> is offset from <span class='texttt'>QP<span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> by <span class='texttt'>QP<span class='operator'>.</span>quantity_<span class='shy'></span>from_<span class='shy'></span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-3'>.</a></div></div></div><div class='para' id='qty.rel.pt.orig-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5519'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-2.sentence-1' class='sentence'>The member <span class='texttt'><i >quantity-spec</i></span> is equal to
<span class='texttt'>QP<span class='operator'>.</span>point_<span class='shy'></span>origin<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> if
<span class='codeblock'><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>.</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
</span>
is satisfied, and
to <span class='texttt'>QP<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> otherwise<a class='hidden_link' href='#qty.rel.pt.orig-2.sentence-1'>.</a></div></div></div></div><div id='qty.zeroth.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.zeroth.pt.orig' style='min-width:110pt'>5.7.2.3.3</a> Zeroth <a class='abbr_ref' href='qty.zeroth.pt.orig.html'>[qty.zeroth.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:zeroth_point_origin_'><a class='hidden_link' href='#lib:zeroth_point_origin_' title='5.7.2.3.3&emsp;Zeroth&emsp;[qty.zeroth.pt.orig]'>zeroth_point_origin_</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> absolute_point_origin<span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.zeroth.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.zeroth.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5539'>#</a></div><div class='texpara'><div id='qty.zeroth.pt.orig-1.sentence-1' class='sentence'><span class='texttt'>zeroth_<span class='shy'></span>point_<span class='shy'></span>origin_<span class='shy'></span><span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span></span> represents an origin
chosen by convention as the value <span class='math'>0</span> of the quantity <span class='texttt'>QS</span><a class='hidden_link' href='#qty.zeroth.pt.orig-1.sentence-1'>.</a></div></div></div></div></div><div id='ops' class='section'><h4 ><a class='secnum' href='#ops' style='min-width:95pt'>5.7.2.4</a> Operations <a class='abbr_ref' href='qty.pt.orig.ops.html'>[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='#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='#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='#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='#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='#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='#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='#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='#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='ops-1'><div class='marginalizedparent'><a class='marginalized' href='#ops-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5584'>#</a></div><div class='texpara'><div id='ops-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='#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='ops-2'><div class='marginalizedparent'><a class='marginalized' href='#ops-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5600'>#</a></div><div class='texpara'><div id='ops-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='#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='ops-3'><div class='marginalizedparent'><a class='marginalized' href='#ops-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5614'>#</a></div><div class='texpara'><div id='ops-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='ops-4'><div class='marginalizedparent'><a class='marginalized' href='#ops-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5627'>#</a></div><div class='texpara'><div id='ops-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='#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='#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='ops-5'><div class='marginalizedparent'><a class='marginalized' href='#ops-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5644'>#</a></div><div class='texpara'><div id='ops-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><div id='utils' class='section'><h4 ><a class='secnum' href='#utils' style='min-width:95pt'>5.7.2.5</a> Utilities <a class='abbr_ref' href='qty.pt.orig.utils.html'>[qty.pt.orig.utils]</a></h4><div id='qty.same.abs.pt.origs' class='section'><h4 ><a class='secnum' href='#qty.same.abs.pt.origs' style='min-width:110pt'>5.7.2.5.1</a> Same absolute <a class='abbr_ref' href='qty.same.abs.pt.origs.html'>[qty.same.abs.pt.origs]</a></h4><div class='texpara'><div id='lib:same-absolute-point-origins,PointOrigin'><div id='lib:PointOrigin,same-absolute-point-origins'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:PointOrigin,same-absolute-point-origins'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#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='#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'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></div></div></div></div><div class='para' id='qty.same.abs.pt.origs-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.same.abs.pt.origs-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5677'>#</a></div><div class='texpara'><div id='qty.same.abs.pt.origs-1.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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2;
<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 >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</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> po1<span class='operator'>.</span><i >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2;
<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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='literal'>false</span>;
</span></div></div></div></div></div><div id='qty.def.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.def.pt.orig' style='min-width:110pt'>5.7.2.5.2</a> Default <a class='abbr_ref' href='qty.def.pt.orig.html'>[qty.def.pt.orig]</a></h4><div class='texpara'><div id='lib:default_point_origin,Reference'><div id='lib:Reference,default_point_origin'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Reference,default_point_origin'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='qty.def.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.def.pt.orig-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5705'>#</a></div><div class='texpara'><div id='qty.def.pt.orig-1.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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> zeroth_point_origin<span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
</span></div></div></div></div></div></div></div></body></html>

View File

@ -1,70 +0,0 @@
<!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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/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>

View File

@ -1,34 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig.types]</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.types'>[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#types'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.3</a> Types <a class='abbr_ref'>[qty.pt.orig.types]</a></h4><div id='qty.abs.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.abs.pt.orig' style='min-width:110pt'>5.7.2.3.1</a> Absolute <a class='abbr_ref' href='qty.abs.pt.orig.html'>[qty.abs.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:absolute_point_origin'><a class='hidden_link' href='#lib:absolute_point_origin' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'>absolute_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> QS; <span class='comment'>// <i >exposition only</i></span>
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.abs.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.abs.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5491'>#</a></div><div class='texpara'><div id='qty.abs.pt.orig-1.sentence-1' class='sentence'>An <a class='hidden_link' href='#def:origin,absolute' title='5.7.2.3.1&emsp;Absolute&emsp;[qty.abs.pt.orig]'><span id='def:origin,absolute'><i >absolute origin</i></span></a> is an origin
chosen by convention and not defined in terms of another origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-1'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining an absolute origin<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-2'>.</a></div> <div id='qty.abs.pt.orig-1.sentence-3' class='sentence'><span class='texttt'>QS</span> is the quantity the origin represents<a class='hidden_link' href='#qty.abs.pt.orig-1.sentence-3'>.</a></div></div></div></div><div id='qty.rel.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.rel.pt.orig' style='min-width:110pt'>5.7.2.3.2</a> Relative <a class='abbr_ref' href='qty.rel.pt.orig.html'>[qty.rel.pt.orig]</a></h4><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><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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:relative_point_origin'><a class='hidden_link' href='#lib:relative_point_origin' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'>relative_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</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> <i >quantity-point</i> <span class='operator'>=</span> QP; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >absolute-point-origin</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
QP<span class='operator'>.</span>absolute_point_origin;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.rel.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5513'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-1.sentence-1' class='sentence'>A <a class='hidden_link' href='#def:origin,relative' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'><span id='def:origin,relative'><i >relative origin</i></span></a> is an origin
of a subspace (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-03">IEC 60050, 102-03-03</a>)<a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-1'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-2' class='sentence'>A specialization of <span class='texttt'>relative_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining a relative origin <i >O</i><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-2'>.</a></div> <div id='qty.rel.pt.orig-1.sentence-3' class='sentence'><i >O</i> is offset from <span class='texttt'>QP<span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> by <span class='texttt'>QP<span class='operator'>.</span>quantity_<span class='shy'></span>from_<span class='shy'></span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.rel.pt.orig-1.sentence-3'>.</a></div></div></div><div class='para' id='qty.rel.pt.orig-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.rel.pt.orig-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5519'>#</a></div><div class='texpara'><div id='qty.rel.pt.orig-2.sentence-1' class='sentence'>The member <span class='texttt'><i >quantity-spec</i></span> is equal to
<span class='texttt'>QP<span class='operator'>.</span>point_<span class='shy'></span>origin<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> if
<span class='codeblock'><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>.</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
</span>
is satisfied, and
to <span class='texttt'>QP<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> otherwise<a class='hidden_link' href='#qty.rel.pt.orig-2.sentence-1'>.</a></div></div></div></div><div id='qty.zeroth.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.zeroth.pt.orig' style='min-width:110pt'>5.7.2.3.3</a> Zeroth <a class='abbr_ref' href='qty.zeroth.pt.orig.html'>[qty.zeroth.pt.orig]</a></h4><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><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> <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:zeroth_point_origin_'><a class='hidden_link' href='#lib:zeroth_point_origin_' title='5.7.2.3.3&emsp;Zeroth&emsp;[qty.zeroth.pt.orig]'>zeroth_point_origin_</a></span> <span class='keyword'>final</span> <span class='operator'>:</span> absolute_point_origin<span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></div><div class='para' id='qty.zeroth.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.zeroth.pt.orig-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5539'>#</a></div><div class='texpara'><div id='qty.zeroth.pt.orig-1.sentence-1' class='sentence'><span class='texttt'>zeroth_<span class='shy'></span>point_<span class='shy'></span>origin_<span class='shy'></span><span class='anglebracket'>&lt;</span>QS<span class='anglebracket'>&gt;</span></span> represents an origin
chosen by convention as the value <span class='math'>0</span> of the quantity <span class='texttt'>QS</span><a class='hidden_link' href='#qty.zeroth.pt.orig-1.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,23 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.orig.utils]</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.utils'>[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#utils'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.5</a> Utilities <a class='abbr_ref'>[qty.pt.orig.utils]</a></h4><div id='qty.same.abs.pt.origs' class='section'><h4 ><a class='secnum' href='#qty.same.abs.pt.origs' style='min-width:110pt'>5.7.2.5.1</a> Same absolute <a class='abbr_ref' href='qty.same.abs.pt.origs.html'>[qty.same.abs.pt.origs]</a></h4><div class='texpara'><div id='lib:same-absolute-point-origins,PointOrigin'><div id='lib:PointOrigin,same-absolute-point-origins'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:PointOrigin,same-absolute-point-origins'>🔗</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'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></div></div></div></div><div class='para' id='qty.same.abs.pt.origs-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.same.abs.pt.origs-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5677'>#</a></div><div class='texpara'><div id='qty.same.abs.pt.origs-1.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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2;
<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 >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</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> po1<span class='operator'>.</span><i >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2;
<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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='literal'>false</span>;
</span></div></div></div></div></div><div id='qty.def.pt.orig' class='section'><h4 ><a class='secnum' href='#qty.def.pt.orig' style='min-width:110pt'>5.7.2.5.2</a> Default <a class='abbr_ref' href='qty.def.pt.orig.html'>[qty.def.pt.orig]</a></h4><div class='texpara'><div id='lib:default_point_origin,Reference'><div id='lib:Reference,default_point_origin'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:Reference,default_point_origin'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='texttt'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='qty.def.pt.orig-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.def.pt.orig-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5705'>#</a></div><div class='texpara'><div id='qty.def.pt.orig-1.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><span class='keyword'>requires</span> <span class='curlybracket'>{</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>; <span class='curlybracket'>}</span><span class='parenthesis'>)</span>
<span class='keyword'>return</span> get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='operator'>.</span><i >point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> zeroth_point_origin<span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
</span></div></div></div></div></div></div></body></html>

View File

@ -1,7 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.static]</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#static'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.5</a> Static member functions <a class='abbr_ref'>[qty.pt.static]</a></h3><div class='texpara'><div id='lib:quantity_point,max'><div id='lib:max,quantity_point'><div id='lib:quantity_point,min'><div id='lib:min,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:min,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5952'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Let <i >F</i> be one of <span class='texttt'>min</span> and <span class='texttt'>max</span><a class='hidden_link' href='#1.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5955'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'><span class='curlybracket'>{</span>quantity_<span class='shy'></span>type<span class='operator'>&#x200b;::&#x200b;</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>, PO<span class='curlybracket'>}</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5959'>#</a></div><div class='texpara'><div id='3.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> quantity_type<span class='operator'>::</span><i >F</i><span class='parenthesis'>(</span><span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,199 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.syn]</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#syn'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.4</a> Class template <span class='texttt'>quantity_<span class='shy'></span>point</span> <a class='abbr_ref'>[qty.pt.syn]</a></h3><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> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPoint' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='concept:QuantityPoint'><span id='lib:QuantityPoint'><span class='tcode_in_codeblock'>QuantityPoint</span></span></span></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span>T, quantity_point<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='concept:QuantityPointOf'><span id='lib:QuantityPointOf'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></span></a> <span class='operator'>=</span>
<a href='#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='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><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>QP<span class='operator'>::</span>quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, V<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<a class='index' id='conceptref:SameAbsolutePointOriginAs'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>::</span>absolute_point_origin<span class='parenthesis'>)</span><span class='parenthesis'>)</span>, V<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> R,
<a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> PO <span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span>,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> <span class='keyword'>double</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>class</span> <span id='lib:quantity_point'><a class='hidden_link' href='#lib:quantity_point' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'>quantity_point</a></span> <span class='curlybracket'>{</span>
<span class='keyword'>public</span><span class='operator'>:</span>
<span class='comment'>// member types and values</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='tcode_in_codeblock'>Reference</span></span></a> <span class='keyword'>auto</span> reference <span class='operator'>=</span> R;
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> quantity_spec <span class='operator'>=</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.dim.concepts.html#concept:Dimension' title='5.4.2.2&emsp;Concepts&emsp;[qty.dim.concepts]'><span id='conceptref:Dimension'><span class='tcode_in_codeblock'>Dimension</span></span></a> <span class='keyword'>auto</span> dimension <span class='operator'>=</span> quantity_spec<span class='operator'>.</span>dimension;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> unit <span class='operator'>=</span> get_unit<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> absolute_point_origin <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> point_origin <span class='operator'>=</span> PO;
<span class='keyword'>using</span> rep <span class='operator'>=</span> Rep;
<span class='keyword'>using</span> quantity_type <span class='operator'>=</span> quantity<span class='anglebracket'>&lt;</span>reference, Rep<span class='anglebracket'>&gt;</span>;
quantity_type <i >quantity-from-origin</i>; <span class='comment'>// <i >exposition only</i></span>
<span class='comment'>// <a href='qty.pt.static.html' title='5.7.5&emsp;Static member functions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>static]</a>, static member functions</span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point min<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>static</span> <span class='keyword'>constexpr</span> quantity_point max<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.cons.html' title='5.7.6&emsp;Constructors'>[qty.<span class='shy'></span>pt.<span class='shy'></span>cons]</a>, constructors and assignment</span>
quantity_point<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='parenthesis'>(</span>quantity_point<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='operator'>~</span>quantity_point<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>point_origin <span class='operator'>=</span><span class='operator'>=</span> default_point_origin<span class='parenthesis'>(</span>R<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span>implicitly_convertible<span class='parenthesis'>(</span>Q<span class='operator'>::</span>quantity_spec, quantity_spec<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>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><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>quantity_spec<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> 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> PO2,
<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>PO2<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'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, FwdQ<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:SameAbsolutePointOriginAs_'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span>PO2, PO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> quantity_point<span class='parenthesis'>(</span>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, PO2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>quantity_type, <span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>convertible_to<span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP<span class='operator'>::</span>quantity_type, quantity_type<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
quantity_point<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
quantity_point<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>quantity_point<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='comment'>// <a href='qty.pt.conv.html' title='5.7.7&emsp;Conversions'>[qty.<span class='shy'></span>pt.<span class='shy'></span>conv]</a>, conversions</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:SameAbsolutePointOriginAs__'></a><i >SameAbsolutePointOriginAs</i><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> NewPO<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span><span class='parenthesis'>(</span>NewPO<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> point_for<span class='parenthesis'>(</span>NewPO new_origin<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith_'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf____'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:UnitCompatibleWith__'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_____'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf______'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf____'><span class='tcode_in_codeblock'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> ToRep,
<a class='index' id='conceptref:UnitCompatibleWith___'></a><i >UnitCompatibleWith</i><span class='anglebracket'>&lt;</span>unit, quantity_spec<span class='anglebracket'>&gt;</span> ToU<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_______'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>quantity_spec<span class='anglebracket'>&gt;</span> <span class='keyword'>auto</span> force_in<span class='parenthesis'>(</span>ToU<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='comment'>// <a href='qty.pt.obs.html' title='5.7.8&emsp;Quantity value observers'>[qty.<span class='shy'></span>pt.<span class='shy'></span>obs]</a>, quantity value observers</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> <span class='keyword'>const</span> quantity_type<span class='operator'>&amp;</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> point_origin<span class='parenthesis'>)</span>
<span class='keyword'>void</span> quantity_ref_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>=</span> <span class='keyword'>delete</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> PO2<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='keyword'>const</span> quantity_point qp<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> qp <span class='operator'>-</span> PO2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='curlybracket'>}</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> quantity_from<span class='parenthesis'>(</span>PO2<span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</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> quantity_from<span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='keyword'>const</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> quantity_from_zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
<span class='comment'>// <a href='qty.pt.conv.ops.html' title='5.7.9&emsp;Conversion operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>conv.<span class='shy'></span>ops]</a>, conversion operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike_'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span> <span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> QP_, <a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike__'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>QP_<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>
<span class='keyword'>constexpr</span> <span class='keyword'>explicit</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span> <span class='keyword'>operator</span> QP_<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>noexcept</span><span class='parenthesis'>(</span><i ><span class='texttt'>see below</span></i><span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.pt.unary.ops.html' title='5.7.10&emsp;Unary operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>unary.<span class='shy'></span>ops]</a>, unary operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='comment'>// <a href='qty.pt.assign.ops.html' title='5.7.11&emsp;Compound assignment operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>assign.<span class='shy'></span>ops]</a>, compound assignment operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable__'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable___'></a><i >Mutable</i><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<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> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>=</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.pt.arith.ops.html' title='5.7.12&emsp;Arithmetic operations'>[qty.<span class='shy'></span>pt.<span class='shy'></span>arith.<span class='shy'></span>ops]</a>, arithmetic operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <span class='keyword'>auto</span> R2, <span class='keyword'>typename</span> Rep2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <a href='#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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, <span class='keyword'>const</span> quantity<span class='anglebracket'>&lt;</span>R2, Rep2<span class='anglebracket'>&gt;</span><span class='operator'>&amp;</span> q<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf_________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<span class='anglebracket'>&gt;</span>
<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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <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'>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><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp, PO2 po<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <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'>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>PO2 po, <span class='keyword'>const</span> QP<span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>;
<span class='comment'>// <a href='qty.pt.cmp.html' title='5.7.13&emsp;Comparison'>[qty.<span class='shy'></span>pt.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf__________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>bool</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>derived_from<span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP, <a href='#concept:QuantityPointOf' title='5.7.4&emsp;Class template quantity_&shy;point&emsp;[qty.pt.syn]'><span id='conceptref:QuantityPointOf___________'><span class='tcode_in_codeblock'>QuantityPointOf</span></span></a><span class='anglebracket'>&lt;</span>absolute_point_origin<span class='anglebracket'>&gt;</span> QP2<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> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='keyword'>const</span> QP<span class='operator'>&amp;</span> lhs, <span class='keyword'>const</span> QP2<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</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> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>explicit</span> quantity_point<span class='parenthesis'>(</span>Q q<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity_point<span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>reference, default_point_origin<span class='parenthesis'>(</span>Q<span class='operator'>::</span>reference<span class='parenthesis'>)</span>, <span class='keyword'>typename</span> Q<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</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> Q, <a href='qty.pt.orig.concepts.html#concept:PointOriginFor' title='5.7.2.2&emsp;Concepts&emsp;[qty.pt.orig.concepts]'><span id='conceptref:PointOriginFor_'><span class='tcode_in_codeblock'>PointOriginFor</span></span></a><span class='anglebracket'>&lt;</span>Q<span class='operator'>::</span>quantity_spec<span class='anglebracket'>&gt;</span> PO<span class='anglebracket'>&gt;</span>
quantity_point<span class='parenthesis'>(</span>Q, PO<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</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'>template</span><span class='anglebracket'>&lt;</span><a href='qty.pt.like.html#concept:QuantityPointLike' title='5.7.3&emsp;Interoperability&emsp;[qty.pt.like]'><span id='conceptref:QuantityPointLike___'><span class='tcode_in_codeblock'>QuantityPointLike</span></span></a> QP, <span class='keyword'>typename</span> Traits <span class='operator'>=</span> quantity_point_like_traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>explicit</span><span class='parenthesis'>(</span>quantity_point_like_traits<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='operator'>::</span>explicit_import<span class='parenthesis'>)</span> quantity_point<span class='parenthesis'>(</span>QP<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> quantity_point<span class='anglebracket'>&lt;</span>Traits<span class='operator'>::</span>reference, Traits<span class='operator'>::</span>point_origin, <span class='keyword'>typename</span> Traits<span class='operator'>::</span>rep<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5928'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>quantity_<span class='shy'></span>point<span class='anglebracket'>&lt;</span>R, PO, Rep<span class='anglebracket'>&gt;</span></span> is a structural type (<a href="https://wg21.link/temp.paramterm.structural.type">N4971, [temp.param]</a>)
if <span class='texttt'>Rep</span> is a structural type<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5932'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>The member <span class='texttt'>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> is equal to <span class='texttt'>PO</span> if
<span class='codeblock'><i >is-derived-from-specialization-of</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>PO<span class='parenthesis'>)</span>, absolute_point_origin<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>
</span>
is <span class='texttt'><span class='literal'>true</span></span>, and
to <span class='texttt'>PO<span class='operator'>.</span><span class='texttt'><i >quantity-point</i></span><span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> otherwise<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,18 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.pt.unary.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#unary.ops'>[qty.pt]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.7.10</a> Unary operations <a class='abbr_ref'>[qty.pt.unary.ops]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6229'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>In the following descriptions,
let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:quantity_point,operator--'><div id='lib:operator--,quantity_point'><div id='lib:quantity_point,operator++'><div id='lib:operator++,quantity_point'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity_point'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a class='index' id='conceptref:Mutable_'></a><span class='texttt'><i >Mutable</i></span><span class='anglebracket'>&lt;</span>quantity_point<span class='anglebracket'>&gt;</span> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>constexpr</span> <span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>)</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span>QP<span class='operator'>&amp;</span><span class='operator'>&amp;</span> qp<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6245'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>@qp<span class='operator'>.</span><span class='texttt'><i >quantity-from-origin</i></span></span><a class='hidden_link' href='#2.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6250'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>QP<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>qp<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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6254'>#</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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> @qp<span class='operator'>.</span><i >quantity-from-origin</i>; <span class='curlybracket'>}</span>
</span></div></div></div></div><div class='texpara'><div id='lib:quantity_point,operator--_'><div id='lib:operator--,quantity_point_'><div id='lib:quantity_point,operator++_'><div id='lib:operator++,quantity_point_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator++,quantity_point_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
<span class='keyword'>constexpr</span> quantity_point <span class='keyword'>operator</span><span class='operator'>-</span><span class='operator'>-</span><span class='parenthesis'>(</span><span class='keyword'>int</span><span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6272'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='curlybracket'>{</span><span class='texttt'><i >quantity-from-origin</i></span>@, PO<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L6277'>#</a></div><div class='texpara'><div id='6.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span> <i >quantity-from-origin</i>@; <span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,46 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ratio]</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.3</a> Utilities <a class='abbr_ref' href='qty.utils.html#qty.ratio'>[qty.utils]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.3.2</a> Ratio <a class='abbr_ref'>[qty.ratio]</a></h3><div class='texpara'><span id='lib:ratio,is-integral'><span id='lib:is-integral,ratio'><span id='lib:ratio,operator/'><span id='lib:operator/,ratio'><span id='lib:ratio,operator+'><span id='lib:operator+,ratio'><span id='lib:ratio,operator-'><span id='lib:operator-,ratio'><span id='lib:ratio,operator<=>'><span id='lib:operator<=>,ratio'><span id='lib:ratio,operator=='><span id='lib:operator==,ratio'><span id='lib:ratio'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:ratio'>🔗</a></div><span class='codeblock'><span class='keyword'>namespace</span> mp_units <span class='curlybracket'>{</span>
<span class='keyword'>struct</span> <i >ratio</i> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
std<span class='operator'>::</span>intmax_t num;
std<span class='operator'>::</span>intmax_t den;
<span class='keyword'>consteval</span> <i >ratio</i><span class='parenthesis'>(</span>std<span class='operator'>::</span>intmax_t n, std<span class='operator'>::</span>intmax_t d <span class='operator'>=</span> <span class='literal'>1</span><span class='parenthesis'>)</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><i >ratio</i>, <i >ratio</i><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>default</span>;
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><i >ratio</i> lhs, <i >ratio</i> rhs<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='keyword'>return</span> <span class='parenthesis'>(</span>lhs <span class='operator'>-</span> rhs<span class='parenthesis'>)</span><span class='operator'>.</span>num <span class='anglebracket'>&lt;</span><span class='operator'>=</span><span class='anglebracket'>&gt;</span> <span class='literal'>0</span>; <span class='curlybracket'>}</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <i >ratio</i> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span><i >ratio</i> r<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='keyword'>return</span> <span class='curlybracket'>{</span><span class='operator'>-</span>r<span class='operator'>.</span>num, r<span class='operator'>.</span>den<span class='curlybracket'>}</span>; <span class='curlybracket'>}</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <i >ratio</i> <span class='keyword'>operator</span><span class='operator'>+</span><span class='parenthesis'>(</span><i >ratio</i> lhs, <i >ratio</i> rhs<span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> <span class='curlybracket'>{</span>lhs<span class='operator'>.</span>num <span class='operator'>*</span> rhs<span class='operator'>.</span>den <span class='operator'>+</span> lhs<span class='operator'>.</span>den <span class='operator'>*</span> rhs<span class='operator'>.</span>num, lhs<span class='operator'>.</span>den <span class='operator'>*</span> rhs<span class='operator'>.</span>den<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <i >ratio</i> <span class='keyword'>operator</span><span class='operator'>-</span><span class='parenthesis'>(</span><i >ratio</i> lhs, <i >ratio</i> rhs<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='keyword'>return</span> lhs <span class='operator'>+</span> <span class='parenthesis'>(</span><span class='operator'>-</span>rhs<span class='parenthesis'>)</span>; <span class='curlybracket'>}</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <i >ratio</i> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><i >ratio</i> lhs, <i >ratio</i> rhs<span class='parenthesis'>)</span>;
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <i >ratio</i> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span><i >ratio</i> lhs, <i >ratio</i> rhs<span class='parenthesis'>)</span>
<span class='curlybracket'>{</span>
<span class='keyword'>return</span> lhs <span class='operator'>*</span> <i >ratio</i><span class='curlybracket'>{</span>rhs<span class='operator'>.</span>den, rhs<span class='operator'>.</span>num<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
<span class='curlybracket'>}</span>;
<span class='keyword'>consteval</span> <span class='keyword'>bool</span> <i >is-integral</i><span class='parenthesis'>(</span><i >ratio</i> r<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='keyword'>return</span> r<span class='operator'>.</span>num <span class='operator'>%</span> r<span class='operator'>.</span>den <span class='operator'>=</span><span class='operator'>=</span> <span class='literal'>0</span>; <span class='curlybracket'>}</span>
<span class='keyword'>consteval</span> <i >ratio</i> <i >common-ratio</i><span class='parenthesis'>(</span><i >ratio</i> r1, <i >ratio</i> r2<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></span></span></span></span></span></span></span></span></span></span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L775'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'><i >ratio</i></span> represents the rational number <span class="mjx-chtml"><span class="mjx-math"><span class="mjx-mrow" aria-hidden="true"><span class="mjx-texatom"><span class="mjx-mrow"><span class="mjx-mtext"><span class="mjx-char MJXc-TeX-type-R" style="padding-top: 0.225em; padding-bottom: 0.298em;">num</span></span></span></span><span class="mjx-texatom"><span class="mjx-mrow"><span class="mjx-mo"><span class="mjx-char MJXc-TeX-main-R" style="padding-top: 0.446em; padding-bottom: 0.593em;">/</span></span></span></span><span class="mjx-texatom"><span class="mjx-mrow"><span class="mjx-mtext"><span class="mjx-char MJXc-TeX-type-R" style="padding-top: 0.372em; padding-bottom: 0.298em;">den</span></span></span></span></span></span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L778'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Unless otherwise specified,
in the following descriptions,
let <span class='texttt'>R<span class='parenthesis'>(</span>r<span class='parenthesis'>)</span></span> be <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>ratio<span class='anglebracket'>&lt;</span>N, D<span class='anglebracket'>&gt;</span></span>,
where <span class='texttt'>N</span> and <span class='texttt'>D</span> are the values of <span class='texttt'>r<span class='operator'>.</span>num</span> and <span class='texttt'>r<span class='operator'>.</span>den</span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:ratio,constructor'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:ratio,constructor'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <span class='texttt'><i >ratio</i></span><span class='parenthesis'>(</span>std<span class='operator'>::</span>intmax_t n, std<span class='operator'>::</span>intmax_t d <span class='operator'>=</span> <span class='literal'>1</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L790'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'>Let <span class='texttt'>N</span> and <span class='texttt'>D</span> be the values of <span class='texttt'>n</span> and <span class='texttt'>d</span><a class='hidden_link' href='#3.sentence-1'>.</a></div> <div id='3.sentence-2' class='sentence'>Let <span class='texttt'>R</span> be <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>ratio<span class='anglebracket'>&lt;</span>N, D<span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#3.sentence-2'>.</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L794'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Effects</i>: Equivalent to
<span class='texttt'>R</span><a class='hidden_link' href='#4.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L799'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Postconditions</i>: <span class='texttt'>num <span class='operator'>=</span><span class='operator'>=</span> R<span class='operator'>&#x200b;::&#x200b;</span>num <span class='operator'>&amp;</span><span class='operator'>&amp;</span> den <span class='operator'>=</span><span class='operator'>=</span> R<span class='operator'>&#x200b;::&#x200b;</span>den</span> is <span class='texttt'><span class='literal'>true</span></span><a class='hidden_link' href='#5.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:ratio,operator*'><div id='lib:operator*,ratio'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,ratio'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='texttt'><i >ratio</i></span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='texttt'><i >ratio</i></span> lhs, <span class='texttt'><i >ratio</i></span> rhs<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L810'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'>Let <span class='texttt'>Res</span> be <span class='texttt'>std<span class='operator'>&#x200b;::&#x200b;</span>ratio_<span class='shy'></span>multiply<span class='anglebracket'>&lt;</span>R<span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, R<span class='parenthesis'>(</span>rhs<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span></span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L813'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='curlybracket'>{</span>Res<span class='operator'>&#x200b;::&#x200b;</span>num, Res<span class='operator'>&#x200b;::&#x200b;</span>den<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:ratio,common-ratio'><div id='lib:common-ratio,ratio'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:common-ratio,ratio'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <span class='texttt'><i >ratio</i></span> <span class='texttt'><i >common-ratio</i></span><span class='parenthesis'>(</span><span class='texttt'><i >ratio</i></span> r1, <span class='texttt'><i >ratio</i></span> r2<span class='parenthesis'>)</span>;
</code></div></div></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L825'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'>Let <span class='texttt'>Res</span> be equal to
<span class='codeblock'>std<span class='operator'>::</span>common_type<span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span><span class='keyword'>int</span>, R<span class='parenthesis'>(</span>r1<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>,
std<span class='operator'>::</span>chrono<span class='operator'>::</span>duration<span class='anglebracket'>&lt;</span><span class='keyword'>int</span>, R<span class='parenthesis'>(</span>r2<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span><span class='operator'>::</span>type<span class='operator'>::</span>period
</span></div></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L832'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> <span class='curlybracket'>{</span>Res<span class='operator'>&#x200b;::&#x200b;</span>num, Res<span class='operator'>&#x200b;::&#x200b;</span>den<span class='curlybracket'>}</span>;</span></div></div></div></div></div></body></html>

View File

@ -1,8 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.real.cpo]</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.real.cpo'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html#qty.real.cpo'>[qty.rep.cpos]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.3.2</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;real</span> <a class='abbr_ref'>[qty.real.cpo]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3801'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3804'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#2.sentence-1'>.</a></div> <div id='2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.1'>(2.1)</a></div><div class='texpara'><div id='2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='qty.rep.concepts.html#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.1.sentence-1'>.</a></div></div></li><li id='2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.2'>(2.2)</a></div><div class='texpara'><div id='2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>real<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>real<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#2.2.sentence-1'>.</a></div></div></li><li id='2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.3'>(2.3)</a></div><div class='texpara'><div id='2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>real<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='qty.rep.concepts.html#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>real</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#2.3.sentence-1'>.</a></div></div></li><li id='2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#2.4'>(2.4)</a></div><div class='texpara'><div id='2.4.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div></body></html>

View File

@ -1,11 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.cmp]</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#cmp'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.8</a> Comparison <a class='abbr_ref'>[qty.ref.cmp]</a></h3><div class='texpara'><div id='lib:reference,operator=='><div id='lib:operator==,reference'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<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>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3543'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:AssociatedUnit,operator=='><div id='lib:operator==,AssociatedUnit'><div id='lib:reference,operator==_'><div id='lib:operator==,reference_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator==,reference_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='texttt'>AssociatedUnit</span></span></a> U2<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>reference, U2 u2<span class='parenthesis'>)</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3556'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> get_<span class='shy'></span>quantity_<span class='shy'></span>spec<span class='parenthesis'>(</span>u2<span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>=</span><span class='operator'>=</span> u2</span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:reference,convertible'><div id='lib:convertible,reference'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:convertible,reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3568'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>implicitly_<span class='shy'></span>convertible<span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> convertible<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:AssociatedUnit,convertible'><div id='lib:convertible,AssociatedUnit'><div id='lib:reference,convertible_'><div id='lib:convertible,reference_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:convertible,reference_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='texttt'>AssociatedUnit</span></span></a> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>reference, U2 u2<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3581'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>implicitly_<span class='shy'></span>convertible<span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, get_<span class='shy'></span>quantity_<span class='shy'></span>spec<span class='parenthesis'>(</span>u2<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> convertible<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, u2<span class='parenthesis'>)</span></span><a class='hidden_link' href='#4.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:AssociatedUnit,convertible_'><div id='lib:convertible,AssociatedUnit_'><div id='lib:reference,convertible__'><div id='lib:convertible,reference__'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:convertible,reference__'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit__'><span class='texttt'>AssociatedUnit</span></span></a> U1<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>U1 u1, reference<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3594'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>implicitly_<span class='shy'></span>convertible<span class='parenthesis'>(</span>get_<span class='shy'></span>quantity_<span class='shy'></span>spec<span class='parenthesis'>(</span>u1<span class='parenthesis'>)</span>, Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> convertible<span class='parenthesis'>(</span>u1, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#5.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,6 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.concepts]</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#concepts'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.5</a> Concepts <a class='abbr_ref'>[qty.ref.concepts]</a></h3><div class='texpara'><div class='itemdecl' id='concept:Reference'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:Reference'><span id='lib:Reference'><span class='texttt'>Reference</span></span></span></a> <span class='operator'>=</span> <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='texttt'>AssociatedUnit</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <span class='parenthesis'>(</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, reference<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</code></div></div><div class='texpara'><div id='sentence-1' class='sentence'>A type <span class='texttt'>T</span> that satisfies <span class='texttt'>Reference</span>
represents the reference of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-01">IEC 60050, 112-01-01</a>)<a class='hidden_link' href='#sentence-1'>.</a></div></div><div class='texpara'><div class='itemdecl' id='concept:ReferenceOf'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:ReferenceOf'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> QS<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:ReferenceOf' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='concept:ReferenceOf'><span id='lib:ReferenceOf'><span class='texttt'>ReferenceOf</span></span></span></a> <span class='operator'>=</span> <a href='#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <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='texttt'>QuantitySpecOf</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_quantity_spec<span class='parenthesis'>(</span>T<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>, QS<span class='anglebracket'>&gt;</span>;
</code></div></div></div></body></html>

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.general]</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#general'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.1</a> General <a class='abbr_ref'>[qty.ref.general]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L1336'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Subclause <a href='qty.ref.html' title='5.4&emsp;Reference'>[qty.<span class='shy'></span>ref]</a> specifies the components
for describing the reference of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-01">IEC 60050, 112-01-01</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,27 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.obs]</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#obs'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.9</a> Observers <a class='abbr_ref'>[qty.ref.obs]</a></h3><div class='texpara'><div id='lib:reference,get_quantity_spec'><div id='lib:get_quantity_spec,reference'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_quantity_spec,reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</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='texttt'>QuantitySpec</span></span></a> <span class='keyword'>auto</span> get_quantity_spec<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3608'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:reference,get_unit'><div id='lib:get_unit,reference'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_unit,reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q, <span class='keyword'>typename</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='texttt'>Unit</span></span></a> <span class='keyword'>auto</span> get_unit<span class='parenthesis'>(</span>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3620'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span></span><a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div><div class='texpara'><div id='lib:AssociatedUnit,get_common_reference'><div id='lib:get_common_reference,AssociatedUnit'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_common_reference,AssociatedUnit'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>consteval</span> <a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='texttt'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> <span id='lib:get_common_reference'><a class='hidden_link' href='#lib:get_common_reference' title='5.4.9&emsp;Observers&emsp;[qty.ref.obs]'>get_common_reference</a></span><span class='parenthesis'>(</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='texttt'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u1,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit__'><span class='texttt'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span> u2,
<a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit___'><span class='texttt'>AssociatedUnit</span></span></a> <span class='keyword'>auto</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3634'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Returns</i>: <span class='texttt'>get_<span class='shy'></span>common_<span class='shy'></span>unit<span class='parenthesis'>(</span>u1, u2, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3638'>#</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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span>
get_common_quantity_spec<span class='parenthesis'>(</span>get_quantity_spec<span class='parenthesis'>(</span>u1<span class='parenthesis'>)</span>, get_quantity_spec<span class='parenthesis'>(</span>u2<span class='parenthesis'>)</span>,
get_quantity_spec<span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>{</span> get_common_unit<span class='parenthesis'>(</span>u1, u2, rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> AssociatedUnit;
<span class='curlybracket'>}</span>
</span></div></div></div></div><div class='texpara'><div id='lib:reference,get_common_reference'><div id='lib:get_common_reference,reference'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:get_common_reference,reference'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R1, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='texttt'>Reference</span></span></a> R2, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='texttt'>Reference</span></span></a><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> Rest<span class='anglebracket'>&gt;</span>
<span class='keyword'>consteval</span> <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='texttt'>Reference</span></span></a> <span class='keyword'>auto</span> <span id='lib:get_common_reference_'><a class='hidden_link' href='#lib:get_common_reference' title='5.4.9&emsp;Observers&emsp;[qty.ref.obs]'>get_common_reference</a></span><span class='parenthesis'>(</span>R1 r1, R2 r2, Rest<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span> rest<span class='parenthesis'>)</span>
<span class='keyword'>requires</span> <i ><span class='texttt'>see below</span></i>;
</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3658'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Returns</i>: <span class='codeblock'><i >reference-t</i><span class='anglebracket'>&lt;</span>get_common_quantity_spec<span class='parenthesis'>(</span>get_quantity_spec<span class='parenthesis'>(</span>R1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, get_quantity_spec<span class='parenthesis'>(</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>,
get_quantity_spec<span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>,
get_common_unit<span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>R2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3666'>#</a></div><div class='texpara'><div id='6.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'><span class='keyword'>requires</span> <span class='curlybracket'>{</span>
get_common_quantity_spec<span class='parenthesis'>(</span>get_quantity_spec<span class='parenthesis'>(</span>r1<span class='parenthesis'>)</span>, get_quantity_spec<span class='parenthesis'>(</span>r2<span class='parenthesis'>)</span>,
get_quantity_spec<span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
get_common_unit<span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>r1<span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>r2<span class='parenthesis'>)</span>, get_unit<span class='parenthesis'>(</span>rest<span class='parenthesis'>)</span><span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>
</span></div></div></div></div></div></body></html>

View File

@ -1,34 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.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.4</a> Reference <a class='abbr_ref' href='qty.ref.html#ops'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.7</a> Operations <a class='abbr_ref'>[qty.ref.ops]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3450'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Each member function with a <span class='textsf'><i >trailing-return-type</i></span>
of <span class='texttt'><span class='operator'>-</span><span class='anglebracket'>&gt;</span> <span class='texttt'><i >reference-t</i></span><span class='anglebracket'>&lt;</span>T<span class='operator'>.</span><span class='operator'>.</span><span class='operator'>.</span><span class='anglebracket'>&gt;</span></span>
returns <span class='texttt'><span class='curlybracket'>{</span><span class='curlybracket'>}</span></span><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div id='lib:Reference,operator*'><div id='lib:operator*,Reference'><div id='lib:Representation,operator*'><div id='lib:operator*,Representation'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,Representation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference'><span class='texttt'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit'></a><span class='texttt'><i >OffsetUnit</i></span><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='keyword'>constexpr</span> quantity<span class='anglebracket'>&lt;</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, Rep<span class='anglebracket'>&gt;</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R r<span class='parenthesis'>)</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3465'>#</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> quantity<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, r<span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:Reference,operator*_'><div id='lib:operator*,Reference_'><div id='lib:Representation,operator*_'><div id='lib:operator*,Representation_'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,Representation_'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdRep, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_'><span class='texttt'>Reference</span></span></a> R,
<a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf_'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> Rep <span class='operator'>=</span> std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span><a class='index' id='conceptref:OffsetUnit_'></a><span class='texttt'><i >OffsetUnit</i></span><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>get_unit<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>)</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>FwdRep<span class='operator'>&amp;</span><span class='operator'>&amp;</span> lhs, R<span class='parenthesis'>)</span>;
</code></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3481'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='texttt'><span class='keyword'>return</span> quantity<span class='curlybracket'>{</span>std<span class='operator'>&#x200b;::&#x200b;</span>forward<span class='anglebracket'>&lt;</span>FwdRep<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>lhs<span class='parenthesis'>)</span>, inverse<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='curlybracket'>}</span>;</span></div></div></div></div><div class='texpara'><div id='lib:Reference,operator/'><div id='lib:operator/,Reference'><div id='lib:quantity,operator/'><div id='lib:operator/,quantity'><div id='lib:Reference,operator*__'><div id='lib:operator*,Reference__'><div id='lib:quantity,operator*'><div id='lib:operator*,quantity'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,quantity'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference__'><span class='texttt'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> FwdQ, <a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference___'><span class='texttt'>Reference</span></span></a> R, <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='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'>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>FwdQ<span class='operator'>&amp;</span><span class='operator'>&amp;</span> q, R<span class='parenthesis'>)</span>;
</code></div></div></div></div></div></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3499'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'>Let <span class='texttt'>@</span> be the <span class='textsf'><i >operator</i></span><a class='hidden_link' href='#4.sentence-1'>.</a></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3502'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'><i >Effects</i>: Equivalent to:
<span class='codeblock'><span class='keyword'>return</span> quantity<span class='curlybracket'>{</span>std<span class='operator'>::</span>forward<span class='anglebracket'>&lt;</span>FwdQ<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>q<span class='parenthesis'>)</span><span class='operator'>.</span><i >numerical-value</i>, Q<span class='operator'>::</span>reference @ R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='curlybracket'>}</span>;
</span></div></div></div></div><div class='texpara'><div class='itemdecl' id='itemdecl:4'><div class='marginalizedparent'><a class='itemDeclLink' href='#itemdecl:4'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference____'><span class='texttt'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf__'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_____'><span class='texttt'>Reference</span></span></a> R, <span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span> <a href='qty.rep.concepts.html#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf___'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span>, get_quantity_spec<span class='parenthesis'>(</span>R<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Rep<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference______'><span class='texttt'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.ref.concepts.html#concept:Reference' title='5.4.5&emsp;Concepts&emsp;[qty.ref.concepts]'><span id='conceptref:Reference_______'><span class='texttt'>Reference</span></span></a> R, <span class='keyword'>typename</span> Q<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</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='anglebracket'>&lt;</span>std<span class='operator'>::</span>remove_cvref_t<span class='anglebracket'>&lt;</span>Q<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>R, Q<span class='operator'>&amp;</span><span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='operator'>=</span> <span class='keyword'>delete</span>;
</code></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3529'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'><i >Recommended practice</i>: Suggest swapping the operands<a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div></div></div></body></html>

View File

@ -1,67 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.ref.syn]</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#syn'>[qty.ref]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.4.6</a> Class template <span class='texttt'>reference</span> <a class='abbr_ref'>[qty.ref.syn]</a></h3><div class='texpara'><span id='lib:reference,cbrt'><span id='lib:cbrt,reference'><span id='lib:reference,sqrt'><span id='lib:sqrt,reference'><span id='lib:reference,pow'><span id='lib:pow,reference'><span id='lib:reference,inverse'><span id='lib:inverse,reference'><span id='lib:AssociatedUnit,operator/'><span id='lib:operator/,AssociatedUnit'><span id='lib:reference,operator/'><span id='lib:operator/,reference'><span id='lib:AssociatedUnit,operator*'><span id='lib:operator*,AssociatedUnit'><span id='lib:reference,operator*'><span id='lib:operator*,reference'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:operator*,reference'>🔗</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> <span class='keyword'>auto</span> Q, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit'><span class='tcode_in_codeblock'>Unit</span></span></a> <span class='keyword'>auto</span> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <i >reference-t</i> <span class='operator'>=</span> reference<span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>Q<span class='parenthesis'>)</span>, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>U<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i></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, <a href='qty.unit.concepts.html#concept:Unit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:Unit_'><span class='tcode_in_codeblock'>Unit</span></span></a> U<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:reference'><a class='hidden_link' href='#lib:reference' title='5.4.6&emsp;Class template reference&emsp;[qty.ref.syn]'>reference</a></span> <span class='curlybracket'>{</span>
<span class='comment'>// <a href='qty.ref.ops.html' title='5.4.7&emsp;Operations'>[qty.<span class='shy'></span>ref.<span class='shy'></span>ops]</a>, operations</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>*</span> Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>*</span> U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>reference, U2<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>*</span> get_quantity_spec<span class='parenthesis'>(</span>U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>*</span> U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U1<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span>U1, reference<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>*</span> Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>*</span> U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>/</span> Q2<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>/</span> U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit__'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>reference, U2<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>/</span> get_quantity_spec<span class='parenthesis'>(</span>U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, U<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>/</span> U2<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit___'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U1<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> <span class='keyword'>operator</span><span class='operator'>/</span><span class='parenthesis'>(</span>U1, reference<span class='parenthesis'>)</span>
<span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>get_quantity_spec<span class='parenthesis'>(</span>U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span> <span class='operator'>/</span> Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span>, U1<span class='curlybracket'>{</span><span class='curlybracket'>}</span> <span class='operator'>/</span> U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> inverse<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>inverse<span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, inverse<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span>std<span class='operator'>::</span>intmax_t Num, std<span class='operator'>::</span>intmax_t Den <span class='operator'>=</span> <span class='literal'>1</span><span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>Den <span class='operator'>!</span><span class='operator'>=</span> <span class='literal'>0</span><span class='parenthesis'>)</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> pow<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>pow<span class='anglebracket'>&lt;</span>Num, Den<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, pow<span class='anglebracket'>&lt;</span>Num, Den<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> sqrt<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>sqrt<span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, sqrt<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>auto</span> cbrt<span class='parenthesis'>(</span>reference<span class='parenthesis'>)</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> <i >reference-t</i><span class='anglebracket'>&lt;</span>cbrt<span class='parenthesis'>(</span>Q<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span>, cbrt<span class='parenthesis'>(</span>U<span class='curlybracket'>{</span><span class='curlybracket'>}</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>;
<span class='comment'>// <a href='qty.ref.cmp.html' title='5.4.8&emsp;Comparison'>[qty.<span class='shy'></span>ref.<span class='shy'></span>cmp]</a>, comparison</span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<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>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U2<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>reference, U2 u2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Q2, <span class='keyword'>typename</span> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>reference, reference<span class='anglebracket'>&lt;</span>Q2, U2<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit_____'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U2<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>reference, U2 u2<span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><a href='qty.unit.concepts.html#concept:AssociatedUnit' title='5.4.4.4&emsp;Concepts&emsp;[qty.unit.concepts]'><span id='conceptref:AssociatedUnit______'><span class='tcode_in_codeblock'>AssociatedUnit</span></span></a> U1<span class='anglebracket'>&gt;</span>
<span class='keyword'>friend</span> <span class='keyword'>consteval</span> <span class='keyword'>bool</span> convertible<span class='parenthesis'>(</span>U1 u1, reference<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3431'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><span class='texttt'>reference<span class='anglebracket'>&lt;</span>Q, U<span class='anglebracket'>&gt;</span></span> represents the reference of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-01">IEC 60050, 112-01-01</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>The unit of measurement <span class='texttt'>U</span> (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-14">IEC 60050, 112-01-14</a>)
is used to measure a value of the quantity <span class='texttt'>Q</span> (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-28">IEC 60050, 112-01-28</a>)<a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#note-1'>1</a></i>:&ensp;<div id='1.sentence-3' class='sentence'><span class='texttt'>reference</span> is typically implicitly instantiated
when specifying that a unit measures a more specific quantity<a class='hidden_link' href='#1.sentence-3'>.</a></div> <div id='example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='keyword'>using</span> <span class='keyword'>namespace</span> si<span class='operator'>::</span>unit_symbols;
<span class='keyword'>auto</span> x <span class='operator'>=</span> <span class='literal'>1</span> <span class='operator'>*</span> m; <span class='comment'>// measures a length</span>
<span class='keyword'>auto</span> y <span class='operator'>=</span> <span class='literal'>1</span> <span class='operator'>*</span> isq<span class='operator'>::</span>width<span class='squarebracket'>[</span>m<span class='squarebracket'>]</span>; <span class='comment'>// measures a width</span>
<span class='keyword'>auto</span> z <span class='operator'>=</span> <span class='literal'>1</span> <span class='operator'>*</span> isq<span class='operator'>::</span>diameter<span class='squarebracket'>[</span>m<span class='squarebracket'>]</span>; <span class='comment'>// measures a diameter</span>
</span>&nbsp;<i>end example</i>]</div></div>&nbsp;<i>end note</i>]</div></div></div></div></div></body></html>

View File

@ -1,18 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rel.pt.orig]</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#qty.rel.pt.orig'>[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#qty.rel.pt.orig'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.3</a> Types <a class='abbr_ref' href='qty.pt.orig.types.html#qty.rel.pt.orig'>[qty.pt.orig.types]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.7.2.3.2</a> Relative <a class='abbr_ref'>[qty.rel.pt.orig]</a></h4><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><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> QP<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span id='lib:relative_point_origin'><a class='hidden_link' href='#lib:relative_point_origin' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'>relative_point_origin</a></span> <span class='operator'>:</span> <i >point-origin-interface</i> <span class='curlybracket'>{</span>
<span class='keyword'>static</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> <i >quantity-point</i> <span class='operator'>=</span> QP; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >quantity-spec</i> <span class='operator'>=</span> <i ><span class='texttt'>see below</span></i>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>static</span> <span class='keyword'>constexpr</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> <span class='keyword'>auto</span> <i >absolute-point-origin</i> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
QP<span class='operator'>.</span>absolute_point_origin;
<span class='curlybracket'>}</span>;
<span class='curlybracket'>}</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5513'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>A <a class='hidden_link' href='#def:origin,relative' title='5.7.2.3.2&emsp;Relative&emsp;[qty.rel.pt.orig]'><span id='def:origin,relative'><i >relative origin</i></span></a> is an origin
of a subspace (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-03-03">IEC 60050, 102-03-03</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>A specialization of <span class='texttt'>relative_<span class='shy'></span>point_<span class='shy'></span>origin</span> is used as a base type when defining a relative origin <i >O</i><a class='hidden_link' href='#1.sentence-2'>.</a></div> <div id='1.sentence-3' class='sentence'><i >O</i> is offset from <span class='texttt'>QP<span class='operator'>.</span>absolute_<span class='shy'></span>point_<span class='shy'></span>origin</span> by <span class='texttt'>QP<span class='operator'>.</span>quantity_<span class='shy'></span>from_<span class='shy'></span>zero<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#1.sentence-3'>.</a></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5519'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>The member <span class='texttt'><i >quantity-spec</i></span> is equal to
<span class='texttt'>QP<span class='operator'>.</span>point_<span class='shy'></span>origin<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> if
<span class='codeblock'><a class='index' id='conceptref:QuantityKindSpec'></a><i >QuantityKindSpec</i><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span><span class='keyword'>auto</span><span class='parenthesis'>(</span>QP<span class='operator'>.</span><i >quantity-spec</i><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span>
</span>
is satisfied, and
to <span class='texttt'>QP<span class='operator'>.</span><span class='texttt'><i >quantity-spec</i></span></span> otherwise<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,88 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rep.concepts]</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#concepts'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.4</a> Concepts <a class='abbr_ref'>[qty.rep.concepts]</a></h3><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'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >WeaklyRegular</i></span><a class='index' id='concept:WeaklyRegular'></a> <span class='operator'>=</span> std<span class='operator'>::</span>copyable<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>equality_comparable<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Scalar</i></span><a class='index' id='concept:Scalar'></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><span class='operator'>!</span>disable_scalar<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='comment'>// scalar operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3932'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Complex'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Complex'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >value-type-t</i></span> <span class='operator'>=</span> <span class='texttt'><i >actual-value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i>, see <a href='qty.fp.traits.html' title='5.5.2.1&emsp;Floating-point'>[qty.<span class='shy'></span>fp.<span class='shy'></span>traits]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Complex</i></span><a class='index' id='concept:Complex'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span>disable_complex<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular_'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> s<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// complex operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> s <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>real<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>imag<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>modulus<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3959'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#2.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Vector'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Vector'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Vector</i></span><a class='index' id='concept:Vector'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span>disable_vector<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular__'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar_'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> s<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// vector operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> s <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>magnitude<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='3'><div class='marginalizedparent'><a class='marginalized' href='#3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3978'>#</a></div><div class='texpara'><div id='3.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#3.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:ScalarRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:ScalarRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >scaling-factor-type-t</i></span> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
std<span class='operator'>::</span>conditional_t<span class='anglebracket'>&lt;</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>, <span class='keyword'>long</span> <span class='keyword'>double</span>, std<span class='operator'>::</span>intmax_t<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >ScalarRepresentation</i></span><a class='index' id='concept:ScalarRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar__'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >scaling-factor-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> f<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// scaling</span>
<span class='curlybracket'>{</span> a <span class='operator'>*</span> f <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> f <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> f <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='4'><div class='marginalizedparent'><a class='marginalized' href='#4'>4</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3997'>#</a></div><div class='texpara'><div id='4.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#4.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:ComplexRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:ComplexRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >ComplexRepresentation</i></span><a class='index' id='concept:ComplexRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Complex'></a><span class='texttt'><i >Complex</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >scaling-factor-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> f<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// scaling</span>
<span class='curlybracket'>{</span> a <span class='operator'>*</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='5'><div class='marginalizedparent'><a class='marginalized' href='#5'>5</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4012'>#</a></div><div class='texpara'><div id='5.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#5.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:VectorRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:VectorRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >VectorRepresentation</i></span><a class='index' id='concept:VectorRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Vector'></a><span class='texttt'><i >Vector</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4021'>#</a></div><div class='texpara'><div id='6.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#6.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Representation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Representation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='concept:Representation'><span id='lib:Representation'><span class='texttt'>Representation</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:ScalarRepresentation'></a><span class='texttt'><i >ScalarRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <a class='index' id='conceptref:ComplexRepresentation'></a><span class='texttt'><i >ComplexRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<a class='index' id='conceptref:VectorRepresentation'></a><span class='texttt'><i >VectorRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4030'>#</a></div><div class='texpara'><div id='7.sentence-1' class='sentence'>A type <span class='texttt'>T</span> models <a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> if
it represents the numerical value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>)<a class='hidden_link' href='#7.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='itemdecl:8'><div class='marginalizedparent'><a class='itemDeclLink' href='#itemdecl:8'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, quantity_character Ch<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >IsOfCharacter</i></span><a class='index' id='concept:IsOfCharacter'></a> <span class='operator'>=</span> <span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>real_scalar <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar___'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>complex_scalar <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Complex_'></a><span class='texttt'><i >Complex</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>vector <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Vector_'></a><span class='texttt'><i >Vector</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='concept:RepresentationOf'><span id='lib:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></span></a> <span class='operator'>=</span>
<a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='parenthesis'>(</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='texttt'>QuantitySpec</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><a class='index' id='conceptref:QuantityKindSpec'></a><span class='texttt'><i >QuantityKindSpec</i></span><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <a class='index' id='conceptref:IsOfCharacter'></a><span class='texttt'><i >IsOfCharacter</i></span><span class='anglebracket'>&lt;</span>T, V<span class='operator'>.</span>character<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span>std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>quantity_character, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:IsOfCharacter_'></a><span class='texttt'><i >IsOfCharacter</i></span><span class='anglebracket'>&lt;</span>T, V<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</code></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4047'>#</a></div><div class='texpara'><div id='8.sentence-1' class='sentence'>A type <span class='texttt'>T</span> models <span class='texttt'><a href='#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>V<span class='anglebracket'>&gt;</span></span> if
<span class='texttt'>T</span> models <a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> and
<ul class='itemize'><li id='8.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#8.1'>(8.1)</a></div><span class='texttt'>V</span> is a kind of quantity, or</li><li id='8.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#8.2'>(8.2)</a></div>if <span class='texttt'>V</span> is a quantity, then <span class='texttt'>T</span> represents a value of its character, or</li><li id='8.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#8.3'>(8.3)</a></div>if <span class='texttt'>V</span> is a quantity character, then <span class='texttt'>T</span> represents a value of <span class='texttt'>V</span><a class='hidden_link' href='#8.sentence-1'>.</a></li></ul></div></div></div></div></body></html>

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rep.cpos.general]</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#cpos.general'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html#general'>[qty.rep.cpos]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.5.3.1</a> General <a class='abbr_ref'>[qty.rep.cpos.general]</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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3795'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Within subclause <a href='qty.rep.cpos.html' title='5.5.3&emsp;Customization point objects'>[qty.<span class='shy'></span>rep.<span class='shy'></span>cpos]</a>,
<a class='hidden_link' href='#def:reified_object' id='def:reified_object'><i>reified object</i></a> is as defined in <a href="https://wg21.link/range.access.general">N4971, [range.access.general]</a><a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

View File

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

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rep.general]</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#general'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.1</a> General <a class='abbr_ref'>[qty.rep.general]</a></h3><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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3682'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>Subclause <a href='qty.rep.html' title='5.5&emsp;Representation'>[qty.<span class='shy'></span>rep]</a> specifies the components
used to constrain the numerical value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>)<a class='hidden_link' href='#1.sentence-1'>.</a></div></div></div></div></body></html>

View File

@ -1,166 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rep]</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'>[qty.rep]</a></h2><div id='general' class='section'><h3 ><a class='secnum' href='#general' style='min-width:80pt'>5.5.1</a> General <a class='abbr_ref' href='qty.rep.general.html'>[qty.rep.general]</a></h3><div class='para' id='general-1'><div class='marginalizedparent'><a class='marginalized' href='#general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3682'>#</a></div><div class='texpara'><div id='general-1.sentence-1' class='sentence'>Subclause [qty.<span class='shy'></span>rep] specifies the components
used to constrain the numerical value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>)<a class='hidden_link' href='#general-1.sentence-1'>.</a></div></div></div></div><div id='traits' class='section'><h3 ><a class='secnum' href='#traits' style='min-width:80pt'>5.5.2</a> Traits <a class='abbr_ref' href='qty.rep.traits.html'>[qty.rep.traits]</a></h3><div id='qty.fp.traits' class='section'><h4 ><a class='secnum' href='#qty.fp.traits' style='min-width:95pt'>5.5.2.1</a> Floating-point <a class='abbr_ref' href='qty.fp.traits.html'>[qty.fp.traits]</a></h4><div class='texpara'><div class='itemdecl' id='qty.fp.traits-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#qty.fp.traits-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span> <span class='operator'>:</span> <span class='texttt'><i >cond-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='comment'>// see <a href="https://wg21.link/readable.traits">N4971, [readable.traits]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>is_pointer_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>!</span>std<span class='operator'>::</span>is_array_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type; <span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>:</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >actual-value-type-t</i></span> <span class='operator'>=</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <span id='lib:treat_as_floating_point'><a class='hidden_link' href='#lib:treat_as_floating_point' title='5.5.2.1&emsp;Floating-point&emsp;[qty.fp.traits]'>treat_as_floating_point</a></span> <span class='operator'>=</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>treat_as_floating_point_v<span class='anglebracket'>&lt;</span><span class='texttt'><i >actual-value-type-t</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='qty.fp.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.fp.traits-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3708'>#</a></div><div class='texpara'><div id='qty.fp.traits-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'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
to help determine whether implicit conversions are allowed among them<a class='hidden_link' href='#qty.fp.traits-1.sentence-1'>.</a></div></div></div></div><div class='para' id='qty.fp.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.fp.traits-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3712'>#</a></div><div class='texpara'><div id='qty.fp.traits-2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize <span class='texttt'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
for cv-unqualified program-defined types<a class='hidden_link' href='#qty.fp.traits-2.sentence-1'>.</a></div> <div id='qty.fp.traits-2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#qty.fp.traits-2.sentence-2'>.</a></div></div></div></div></div><div id='qty.char.traits' class='section'><h4 ><a class='secnum' href='#qty.char.traits' style='min-width:95pt'>5.5.2.2</a> Quantity character <a class='abbr_ref' href='qty.char.traits.html'>[qty.char.traits]</a></h4><div class='texpara'><div id='lib:disable_vector'><div id='lib:disable_complex'><div id='lib:disable_scalar'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:disable_scalar'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_scalar <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_complex <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_vector <span class='operator'>=</span> <span class='literal'>false</span>;
</code></div></div></div></div></div><div class='para' id='qty.char.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3736'>#</a></div><div class='texpara'><div id='qty.char.traits-1.sentence-1' class='sentence'>Some quantities are defined as having a numerical value (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>) of a specific set (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-01-02">IEC 60050, 102-01-02</a>)<a class='hidden_link' href='#qty.char.traits-1.sentence-1'>.</a></div> <div id='qty.char.traits-1.sentence-2' class='sentence'>The representation concepts use these traits
to help determine the sets <span class='texttt'>T</span> represents<a class='hidden_link' href='#qty.char.traits-1.sentence-2'>.</a></div></div></div></div><div class='para' id='qty.char.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3741'>#</a></div><div class='texpara'><div id='qty.char.traits-2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize these templates
for cv-unqualified program-defined types<a class='hidden_link' href='#qty.char.traits-2.sentence-1'>.</a></div> <div id='qty.char.traits-2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#qty.char.traits-2.sentence-2'>.</a></div></div></div></div><div class='para nonNormativeOnly' id='qty.char.traits-3'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3749'>#</a></div><div class='texpara'><div id='qty.char.traits-note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#qty.char.traits-note-1'>1</a></i>:&ensp;<div id='qty.char.traits-3.sentence-1' class='sentence'>These templates prevent use of representation types with the library
that satisfy but do not in fact model their corresponding concept<a class='hidden_link' href='#qty.char.traits-3.sentence-1'>.</a></div>&nbsp;<i>end note</i>]</div></div></div></div></div></div><div id='qty.val.traits' class='section'><h4 ><a class='secnum' href='#qty.val.traits' style='min-width:95pt'>5.5.2.3</a> Values <a class='abbr_ref' href='qty.val.traits.html'>[qty.val.traits]</a></h4><div class='para' id='qty.val.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3758'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-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='qty.val.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3773'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-2.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='qty.val.traits-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#qty.val.traits-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='qty.val.traits-3'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3782'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-3.sentence-1'>.</a></div></div></div></div><div class='para' id='qty.val.traits-4'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3786'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-4.sentence-1'>.</a></div></div></div></div></div></div><div id='cpos' class='section'><h3 ><a class='secnum' href='#cpos' style='min-width:80pt'>5.5.3</a> Customization point objects <a class='abbr_ref' href='qty.rep.cpos.html'>[qty.rep.cpos]</a></h3><div id='cpos.general' class='section'><h4 ><a class='secnum' href='#cpos.general' style='min-width:95pt'>5.5.3.1</a> General <a class='abbr_ref' href='qty.rep.cpos.general.html'>[qty.rep.cpos.general]</a></h4><div class='para' id='cpos.general-1'><div class='marginalizedparent'><a class='marginalized' href='#cpos.general-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3795'>#</a></div><div class='texpara'><div id='cpos.general-1.sentence-1' class='sentence'>Within subclause <a href='#cpos' title='5.5.3&emsp;Customization point objects'>[qty.<span class='shy'></span>rep.<span class='shy'></span>cpos]</a>,
<a class='hidden_link' href='#def:reified_object' id='def:reified_object'><i>reified object</i></a> is as defined in <a href="https://wg21.link/range.access.general">N4971, [range.access.general]</a><a class='hidden_link' href='#cpos.general-1.sentence-1'>.</a></div></div></div></div><div id='qty.real.cpo' class='section'><h4 ><a class='secnum' href='#qty.real.cpo' style='min-width:95pt'>5.5.3.2</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;real</span> <a class='abbr_ref' href='qty.real.cpo.html'>[qty.real.cpo]</a></h4><div class='para' id='qty.real.cpo-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.real.cpo-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3801'>#</a></div><div class='texpara'><div id='qty.real.cpo-1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#qty.real.cpo-1.sentence-1'>.</a></div></div></div><div class='para' id='qty.real.cpo-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.real.cpo-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3804'>#</a></div><div class='texpara'><div id='qty.real.cpo-2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#qty.real.cpo-2.sentence-1'>.</a></div> <div id='qty.real.cpo-2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='qty.real.cpo-2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.real.cpo-2.1'>(2.1)</a></div><div class='texpara'><div id='qty.real.cpo-2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.real.cpo-2.1.sentence-1'>.</a></div></div></li><li id='qty.real.cpo-2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.real.cpo-2.2'>(2.2)</a></div><div class='texpara'><div id='qty.real.cpo-2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>real<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>real<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.real.cpo-2.2.sentence-1'>.</a></div></div></li><li id='qty.real.cpo-2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.real.cpo-2.3'>(2.3)</a></div><div class='texpara'><div id='qty.real.cpo-2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>real<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>real</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.real.cpo-2.3.sentence-1'>.</a></div></div></li><li id='qty.real.cpo-2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.real.cpo-2.4'>(2.4)</a></div><div class='texpara'><div id='qty.real.cpo-2.4.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>real<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.real.cpo-2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div id='qty.imag.cpo' class='section'><h4 ><a class='secnum' href='#qty.imag.cpo' style='min-width:95pt'>5.5.3.3</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;imag</span> <a class='abbr_ref' href='qty.imag.cpo.html'>[qty.imag.cpo]</a></h4><div class='para' id='qty.imag.cpo-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.imag.cpo-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3826'>#</a></div><div class='texpara'><div id='qty.imag.cpo-1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#qty.imag.cpo-1.sentence-1'>.</a></div></div></div><div class='para' id='qty.imag.cpo-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.imag.cpo-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3829'>#</a></div><div class='texpara'><div id='qty.imag.cpo-2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#qty.imag.cpo-2.sentence-1'>.</a></div> <div id='qty.imag.cpo-2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='qty.imag.cpo-2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.imag.cpo-2.1'>(2.1)</a></div><div class='texpara'><div id='qty.imag.cpo-2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular_'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.imag.cpo-2.1.sentence-1'>.</a></div></div></li><li id='qty.imag.cpo-2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.imag.cpo-2.2'>(2.2)</a></div><div class='texpara'><div id='qty.imag.cpo-2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>imag<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar__'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>imag<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.imag.cpo-2.2.sentence-1'>.</a></div></div></li><li id='qty.imag.cpo-2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.imag.cpo-2.3'>(2.3)</a></div><div class='texpara'><div id='qty.imag.cpo-2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>imag<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar___'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>imag</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.imag.cpo-2.3.sentence-1'>.</a></div></div></li><li id='qty.imag.cpo-2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.imag.cpo-2.4'>(2.4)</a></div><div class='texpara'><div id='qty.imag.cpo-2.4.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>imag<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.imag.cpo-2.4.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div id='qty.modulus.cpo' class='section'><h4 ><a class='secnum' href='#qty.modulus.cpo' style='min-width:95pt'>5.5.3.4</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;modulus</span> <a class='abbr_ref' href='qty.modulus.cpo.html'>[qty.modulus.cpo]</a></h4><div class='para' id='qty.modulus.cpo-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.modulus.cpo-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3851'>#</a></div><div class='texpara'><div id='qty.modulus.cpo-1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#qty.modulus.cpo-1.sentence-1'>.</a></div></div></div><div class='para' id='qty.modulus.cpo-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.modulus.cpo-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3854'>#</a></div><div class='texpara'><div id='qty.modulus.cpo-2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#qty.modulus.cpo-2.sentence-1'>.</a></div> <div id='qty.modulus.cpo-2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='qty.modulus.cpo-2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.1'>(2.1)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular__'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.modulus.cpo-2.1.sentence-1'>.</a></div></div></li><li id='qty.modulus.cpo-2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.2'>(2.2)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>modulus<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar____'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>modulus<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.modulus.cpo-2.2.sentence-1'>.</a></div></div></li><li id='qty.modulus.cpo-2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.3'>(2.3)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>modulus<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_____'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>modulus</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.modulus.cpo-2.3.sentence-1'>.</a></div></div></li><li id='qty.modulus.cpo-2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.4'>(2.4)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.4.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar______'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.modulus.cpo-2.4.sentence-1'>.</a></div></div></li><li id='qty.modulus.cpo-2.5'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.5'>(2.5)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.5.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>abs<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_______'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>abs</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.modulus.cpo-2.5.sentence-1'>.</a></div></div></li><li id='qty.modulus.cpo-2.6'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.modulus.cpo-2.6'>(2.6)</a></div><div class='texpara'><div id='qty.modulus.cpo-2.6.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>modulus<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.modulus.cpo-2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div><div id='qty.mag.cpo' class='section'><h4 ><a class='secnum' href='#qty.mag.cpo' style='min-width:95pt'>5.5.3.5</a> <span class='texttt'>mp_<span class='shy'></span>units&#x200b;::&#x200b;magnitude</span> <a class='abbr_ref' href='qty.mag.cpo.html'>[qty.mag.cpo]</a></h4><div class='para' id='qty.mag.cpo-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.mag.cpo-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3884'>#</a></div><div class='texpara'><div id='qty.mag.cpo-1.sentence-1' class='sentence'>The name <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude</span> denotes a customization point object (<a href="https://wg21.link/customization.point.object">N4971, [customization.point.object]</a>)<a class='hidden_link' href='#qty.mag.cpo-1.sentence-1'>.</a></div></div></div><div class='para' id='qty.mag.cpo-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.mag.cpo-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3887'>#</a></div><div class='texpara'><div id='qty.mag.cpo-2.sentence-1' class='sentence'>Given a subexpression <span class='texttt'>E</span> with type <span class='texttt'>T</span>,
let <span class='texttt'>t</span> be an lvalue that denotes the reified object for <span class='texttt'>E</span><a class='hidden_link' href='#qty.mag.cpo-2.sentence-1'>.</a></div> <div id='qty.mag.cpo-2.sentence-2' class='sentence'>Then:
<ul class='itemize'><li id='qty.mag.cpo-2.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.1'>(2.1)</a></div><div class='texpara'><div id='qty.mag.cpo-2.1.sentence-1' class='sentence'>If <span class='texttt'>T</span> does not model <a href='#concept:WeaklyRegular' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:WeaklyRegular___'><span class='texttt'><i >WeaklyRegular</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.mag.cpo-2.1.sentence-1'>.</a></div></div></li><li id='qty.mag.cpo-2.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.2'>(2.2)</a></div><div class='texpara'><div id='qty.mag.cpo-2.2.sentence-1' class='sentence'>If <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>magnitude<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar________'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>magnitude<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.mag.cpo-2.2.sentence-1'>.</a></div></div></li><li id='qty.mag.cpo-2.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.3'>(2.3)</a></div><div class='texpara'><div id='qty.mag.cpo-2.3.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>magnitude<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar_________'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.mag.cpo-2.3.sentence-1'>.</a></div></div></li><li id='qty.mag.cpo-2.4'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.4'>(2.4)</a></div><div class='texpara'><div id='qty.mag.cpo-2.4.sentence-1' class='sentence'>Otherwise, if <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar__________'><span class='texttt'><i >Scalar</i></span></span></a>,
<span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>&#x200b;E<span class='parenthesis'>)</span></span> is expression-equivalent to <span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>t<span class='operator'>.</span>abs<span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#qty.mag.cpo-2.4.sentence-1'>.</a></div></div></li><li id='qty.mag.cpo-2.5'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.5'>(2.5)</a></div><div class='texpara'><div id='qty.mag.cpo-2.5.sentence-1' class='sentence'>Otherwise, if <span class='texttt'>T</span> is a class or enumeration type and
<span class='texttt'><span class='keyword'>auto</span><span class='parenthesis'>(</span>abs<span class='parenthesis'>(</span>t<span class='parenthesis'>)</span><span class='parenthesis'>)</span></span> is a valid expression whose type models <a href='#concept:Scalar' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Scalar___________'><span class='texttt'><i >Scalar</i></span></span></a>
where the meaning of <span class='texttt'>magnitude</span> is established as-if by performing argument-dependent lookup only (<a href="https://wg21.link/basic.lookup.argdep">N4971, [basic.lookup.argdep]</a>),
then <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is expression-equivalent to that expression<a class='hidden_link' href='#qty.mag.cpo-2.5.sentence-1'>.</a></div></div></li><li id='qty.mag.cpo-2.6'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#qty.mag.cpo-2.6'>(2.6)</a></div><div class='texpara'><div id='qty.mag.cpo-2.6.sentence-1' class='sentence'>Otherwise, <span class='texttt'>mp_<span class='shy'></span>units<span class='operator'>&#x200b;::&#x200b;</span>magnitude<span class='parenthesis'>(</span>E<span class='parenthesis'>)</span></span> is ill-formed<a class='hidden_link' href='#qty.mag.cpo-2.6.sentence-1'>.</a></div></div></li></ul></div></div></div></div></div><div id='concepts' class='section'><h3 ><a class='secnum' href='#concepts' style='min-width:80pt'>5.5.4</a> Concepts <a class='abbr_ref' href='qty.rep.concepts.html'>[qty.rep.concepts]</a></h3><div class='texpara'><div class='itemdecl' id='concepts-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#concepts-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >WeaklyRegular</i></span><a class='index' id='concept:WeaklyRegular'></a> <span class='operator'>=</span> std<span class='operator'>::</span>copyable<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> std<span class='operator'>::</span>equality_comparable<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Scalar</i></span><a class='index' id='concept:Scalar'></a> <span class='operator'>=</span> <span class='parenthesis'>(</span><span class='operator'>!</span>disable_scalar<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular____'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b<span class='parenthesis'>)</span> <span class='curlybracket'>{</span> <span class='comment'>// <i >exposition only</i></span>
<span class='comment'>// scalar operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='concepts-1'><div class='marginalizedparent'><a class='marginalized' href='#concepts-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3932'>#</a></div><div class='texpara'><div id='concepts-1.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-1.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Complex'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Complex'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >value-type-t</i></span> <span class='operator'>=</span> <span class='texttt'><i >actual-value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>; <span class='comment'>// <i >exposition only</i>, see <a href='#qty.fp.traits' title='5.5.2.1&emsp;Floating-point'>[qty.<span class='shy'></span>fp.<span class='shy'></span>traits]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Complex</i></span><a class='index' id='concept:Complex'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span>disable_complex<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular_____'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar____________'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
std<span class='operator'>::</span>constructible_from<span class='anglebracket'>&lt;</span>T, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> s<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// complex operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> s <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>real<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>imag<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>modulus<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='concepts-2'><div class='marginalizedparent'><a class='marginalized' href='#concepts-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3959'>#</a></div><div class='texpara'><div id='concepts-2.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-2.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Vector'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Vector'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >Vector</i></span><a class='index' id='concept:Vector'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span>disable_vector<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:WeaklyRegular______'></a><span class='texttt'><i >WeaklyRegular</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar_____________'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span><span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >value-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> s<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// vector operations</span>
<span class='curlybracket'>{</span> <span class='operator'>-</span>a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>+</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>-</span> b <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>*</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> s <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> s <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='operator'>::</span>mp_units<span class='operator'>::</span>magnitude<span class='parenthesis'>(</span>a<span class='parenthesis'>)</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='concepts-3'><div class='marginalizedparent'><a class='marginalized' href='#concepts-3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3978'>#</a></div><div class='texpara'><div id='concepts-3.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-3.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:ScalarRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:ScalarRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >scaling-factor-type-t</i></span> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
std<span class='operator'>::</span>conditional_t<span class='anglebracket'>&lt;</span>treat_as_floating_point<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>, <span class='keyword'>long</span> <span class='keyword'>double</span>, std<span class='operator'>::</span>intmax_t<span class='anglebracket'>&gt;</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >ScalarRepresentation</i></span><a class='index' id='concept:ScalarRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar______________'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >scaling-factor-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> f<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// scaling</span>
<span class='curlybracket'>{</span> a <span class='operator'>*</span> f <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> f <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> f <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='concepts-4'><div class='marginalizedparent'><a class='marginalized' href='#concepts-4'>4</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3997'>#</a></div><div class='texpara'><div id='concepts-4.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-4.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:ComplexRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:ComplexRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >ComplexRepresentation</i></span><a class='index' id='concept:ComplexRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Complex'></a><span class='texttt'><i >Complex</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span>T a, T b, <span class='texttt'><i >scaling-factor-type-t</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> f<span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
<span class='comment'>// scaling</span>
<span class='curlybracket'>{</span> a <span class='operator'>*</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='operator'>*</span> a <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>{</span> a <span class='operator'>/</span> T<span class='parenthesis'>(</span>f<span class='parenthesis'>)</span> <span class='curlybracket'>}</span> <span class='operator'>-</span><span class='anglebracket'>&gt;</span> std<span class='operator'>::</span>common_with<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
<span class='curlybracket'>}</span>;
</code></div></div><div class='para' id='concepts-5'><div class='marginalizedparent'><a class='marginalized' href='#concepts-5'>5</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4012'>#</a></div><div class='texpara'><div id='concepts-5.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-5.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:VectorRepresentation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:VectorRepresentation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >VectorRepresentation</i></span><a class='index' id='concept:VectorRepresentation'></a> <span class='operator'>=</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span><span class='operator'>!</span><span class='texttt'><i >is-specialization-of</i></span><span class='anglebracket'>&lt;</span>T, quantity<span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Vector'></a><span class='texttt'><i >Vector</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='concepts-6'><div class='marginalizedparent'><a class='marginalized' href='#concepts-6'>6</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4021'>#</a></div><div class='texpara'><div id='concepts-6.sentence-1' class='sentence'>TBD<a class='hidden_link' href='#concepts-6.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concept:Representation'><div class='marginalizedparent'><a class='itemDeclLink' href='#concept:Representation'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='concept:Representation'><span id='lib:Representation'><span class='texttt'>Representation</span></span></span></a> <span class='operator'>=</span> <a class='index' id='conceptref:ScalarRepresentation'></a><span class='texttt'><i >ScalarRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <a class='index' id='conceptref:ComplexRepresentation'></a><span class='texttt'><i >ComplexRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span>
<a class='index' id='conceptref:VectorRepresentation'></a><span class='texttt'><i >VectorRepresentation</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='concepts-7'><div class='marginalizedparent'><a class='marginalized' href='#concepts-7'>7</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4030'>#</a></div><div class='texpara'><div id='concepts-7.sentence-1' class='sentence'>A type <span class='texttt'>T</span> models <a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation'><span class='texttt'>Representation</span></span></a> if
it represents the numerical value of a quantity (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>)<a class='hidden_link' href='#concepts-7.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='concepts-itemdecl:8'><div class='marginalizedparent'><a class='itemDeclLink' href='#concepts-itemdecl:8'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, quantity_character Ch<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <span class='texttt'><i >IsOfCharacter</i></span><a class='index' id='concept:IsOfCharacter'></a> <span class='operator'>=</span> <span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>real_scalar <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Scalar_______________'></a><span class='texttt'><i >Scalar</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span> <span class='comment'>// <i >exposition only</i></span>
<span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>complex_scalar <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Complex_'></a><span class='texttt'><i >Complex</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span>Ch <span class='operator'>=</span><span class='operator'>=</span> quantity_character<span class='operator'>::</span>vector <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:Vector_'></a><span class='texttt'><i >Vector</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T, <span class='keyword'>auto</span> V<span class='anglebracket'>&gt;</span>
<span class='keyword'>concept</span> <a class='hidden_link' href='#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='concept:RepresentationOf'><span id='lib:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></span></a> <span class='operator'>=</span>
<a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation_'><span class='texttt'>Representation</span></span></a><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='parenthesis'>(</span><span class='parenthesis'>(</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='texttt'>QuantitySpec</span></span></a><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='parenthesis'>(</span><a class='index' id='conceptref:QuantityKindSpec'></a><span class='texttt'><i >QuantityKindSpec</i></span><span class='anglebracket'>&lt;</span><span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>|</span><span class='operator'>|</span> <a class='index' id='conceptref:IsOfCharacter'></a><span class='texttt'><i >IsOfCharacter</i></span><span class='anglebracket'>&lt;</span>T, V<span class='operator'>.</span>character<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>|</span><span class='operator'>|</span>
<span class='parenthesis'>(</span>std<span class='operator'>::</span>same_as<span class='anglebracket'>&lt;</span>quantity_character, <span class='keyword'>decltype</span><span class='parenthesis'>(</span>V<span class='parenthesis'>)</span><span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <a class='index' id='conceptref:IsOfCharacter_'></a><span class='texttt'><i >IsOfCharacter</i></span><span class='anglebracket'>&lt;</span>T, V<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>;
</code></div></div><div class='para' id='concepts-8'><div class='marginalizedparent'><a class='marginalized' href='#concepts-8'>8</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L4047'>#</a></div><div class='texpara'><div id='concepts-8.sentence-1' class='sentence'>A type <span class='texttt'>T</span> models <span class='texttt'><a href='#concept:RepresentationOf' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:RepresentationOf'><span class='texttt'>RepresentationOf</span></span></a><span class='anglebracket'>&lt;</span>V<span class='anglebracket'>&gt;</span></span> if
<span class='texttt'>T</span> models <a href='#concept:Representation' title='5.5.4&emsp;Concepts&emsp;[qty.rep.concepts]'><span id='conceptref:Representation__'><span class='texttt'>Representation</span></span></a> and
<ul class='itemize'><li id='concepts-8.1'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#concepts-8.1'>(8.1)</a></div><span class='texttt'>V</span> is a kind of quantity, or</li><li id='concepts-8.2'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#concepts-8.2'>(8.2)</a></div>if <span class='texttt'>V</span> is a quantity, then <span class='texttt'>T</span> represents a value of its character, or</li><li id='concepts-8.3'><div class='marginalizedparent' style='left:-27mm'><a class='marginalized' href='#concepts-8.3'>(8.3)</a></div>if <span class='texttt'>V</span> is a quantity character, then <span class='texttt'>T</span> represents a value of <span class='texttt'>V</span><a class='hidden_link' href='#concepts-8.sentence-1'>.</a></li></ul></div></div></div></div></div></body></html>

View File

@ -1,41 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.rep.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#traits'>[qty.rep]</a></h2><h3 ><a class='secnum' style='min-width:80pt'>5.5.2</a> Traits <a class='abbr_ref'>[qty.rep.traits]</a></h3><div id='qty.fp.traits' class='section'><h4 ><a class='secnum' href='#qty.fp.traits' style='min-width:95pt'>5.5.2.1</a> Floating-point <a class='abbr_ref' href='qty.fp.traits.html'>[qty.fp.traits]</a></h4><div class='texpara'><div class='itemdecl' id='qty.fp.traits-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#qty.fp.traits-itemdecl:1'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span> <span class='operator'>:</span> <span class='texttt'><i >cond-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>; <span class='comment'>// see <a href="https://wg21.link/readable.traits">N4971, [readable.traits]</a></span>
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>requires</span><span class='parenthesis'>(</span><span class='operator'>!</span>std<span class='operator'>::</span>is_pointer_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span> <span class='operator'>!</span>std<span class='operator'>::</span>is_array_v<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='parenthesis'>)</span> <span class='operator'>&amp;</span><span class='operator'>&amp;</span>
<span class='keyword'>requires</span> <span class='curlybracket'>{</span> <span class='keyword'>typename</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type; <span class='curlybracket'>}</span>
<span class='keyword'>struct</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='operator'>:</span> std<span class='operator'>::</span>indirectly_readable_traits<span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span> <span class='curlybracket'>{</span><span class='curlybracket'>}</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>using</span> <span class='texttt'><i >actual-value-type-t</i></span> <span class='operator'>=</span> <span class='texttt'><i >actual-value-type</i></span><span class='anglebracket'>&lt;</span>T<span class='anglebracket'>&gt;</span><span class='operator'>::</span>value_type;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> Rep<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> <span id='lib:treat_as_floating_point'><a class='hidden_link' href='#lib:treat_as_floating_point' title='5.5.2.1&emsp;Floating-point&emsp;[qty.fp.traits]'>treat_as_floating_point</a></span> <span class='operator'>=</span>
std<span class='operator'>::</span>chrono<span class='operator'>::</span>treat_as_floating_point_v<span class='anglebracket'>&lt;</span><span class='texttt'><i >actual-value-type-t</i></span><span class='anglebracket'>&lt;</span>Rep<span class='anglebracket'>&gt;</span><span class='anglebracket'>&gt;</span>;
</code></div></div><div class='para' id='qty.fp.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.fp.traits-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3708'>#</a></div><div class='texpara'><div id='qty.fp.traits-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'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
to help determine whether implicit conversions are allowed among them<a class='hidden_link' href='#qty.fp.traits-1.sentence-1'>.</a></div></div></div></div><div class='para' id='qty.fp.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.fp.traits-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3712'>#</a></div><div class='texpara'><div id='qty.fp.traits-2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize <span class='texttt'>treat_<span class='shy'></span>as_<span class='shy'></span>floating_<span class='shy'></span>point</span>
for cv-unqualified program-defined types<a class='hidden_link' href='#qty.fp.traits-2.sentence-1'>.</a></div> <div id='qty.fp.traits-2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#qty.fp.traits-2.sentence-2'>.</a></div></div></div></div></div><div id='qty.char.traits' class='section'><h4 ><a class='secnum' href='#qty.char.traits' style='min-width:95pt'>5.5.2.2</a> Quantity character <a class='abbr_ref' href='qty.char.traits.html'>[qty.char.traits]</a></h4><div class='texpara'><div id='lib:disable_vector'><div id='lib:disable_complex'><div id='lib:disable_scalar'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:disable_scalar'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_scalar <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_complex <span class='operator'>=</span> <span class='literal'>false</span>;
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>typename</span> T<span class='anglebracket'>&gt;</span>
<span class='keyword'>constexpr</span> <span class='keyword'>bool</span> disable_vector <span class='operator'>=</span> <span class='literal'>false</span>;
</code></div></div></div></div></div><div class='para' id='qty.char.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3736'>#</a></div><div class='texpara'><div id='qty.char.traits-1.sentence-1' class='sentence'>Some quantities are defined as having a numerical value (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-29">IEC 60050, 112-01-29</a>) of a specific set (<a href="https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=102-01-02">IEC 60050, 102-01-02</a>)<a class='hidden_link' href='#qty.char.traits-1.sentence-1'>.</a></div> <div id='qty.char.traits-1.sentence-2' class='sentence'>The representation concepts use these traits
to help determine the sets <span class='texttt'>T</span> represents<a class='hidden_link' href='#qty.char.traits-1.sentence-2'>.</a></div></div></div></div><div class='para' id='qty.char.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3741'>#</a></div><div class='texpara'><div id='qty.char.traits-2.sentence-1' class='sentence'><i >Remarks</i>: Pursuant to <a href="https://wg21.link/namespace.std">N4971, [namespace.std]</a> (<a href='spec.ext.html' title='4.1&emsp;External'>[spec.<span class='shy'></span>ext]</a>),
users may specialize these templates
for cv-unqualified program-defined types<a class='hidden_link' href='#qty.char.traits-2.sentence-1'>.</a></div> <div id='qty.char.traits-2.sentence-2' class='sentence'>Such specializations shall be usable in constant expressions (<a href="https://wg21.link/expr.const">N4971, [expr.const]</a>)
and have type <span class='texttt'><span class='keyword'>const</span> <span class='keyword'>bool</span></span><a class='hidden_link' href='#qty.char.traits-2.sentence-2'>.</a></div></div></div></div><div class='para nonNormativeOnly' id='qty.char.traits-3'><div class='marginalizedparent'><a class='marginalized' href='#qty.char.traits-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3749'>#</a></div><div class='texpara'><div id='qty.char.traits-note-1' class='note'><div class='texpara'>[<i>Note&nbsp;<a href='#qty.char.traits-note-1'>1</a></i>:&ensp;<div id='qty.char.traits-3.sentence-1' class='sentence'>These templates prevent use of representation types with the library
that satisfy but do not in fact model their corresponding concept<a class='hidden_link' href='#qty.char.traits-3.sentence-1'>.</a></div>&nbsp;<i>end note</i>]</div></div></div></div></div></div><div id='qty.val.traits' class='section'><h4 ><a class='secnum' href='#qty.val.traits' style='min-width:95pt'>5.5.2.3</a> Values <a class='abbr_ref' href='qty.val.traits.html'>[qty.val.traits]</a></h4><div class='para' id='qty.val.traits-1'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3758'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-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='qty.val.traits-2'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3773'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-2.sentence-1'>.</a></div></div></div><div class='texpara'><div class='itemdecl' id='qty.val.traits-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#qty.val.traits-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='qty.val.traits-3'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3782'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-3.sentence-1'>.</a></div></div></div></div><div class='para' id='qty.val.traits-4'><div class='marginalizedparent'><a class='marginalized' href='#qty.val.traits-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/mpusz/mp-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L3786'>#</a></div><div class='texpara'><div id='qty.val.traits-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='#qty.val.traits-4.sentence-1'>.</a></div></div></div></div></div></div></body></html>

View File

@ -1,16 +0,0 @@
<!DOCTYPE html><html lang='en'><head><title>[qty.same.abs.pt.origs]</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#qty.same.abs.pt.origs'>[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#qty.same.abs.pt.origs'>[qty.pt.orig]</a></h3><h4 ><a class='secnum' style='min-width:95pt'>5.7.2.5</a> Utilities <a class='abbr_ref' href='qty.pt.orig.utils.html#qty.same.abs.pt.origs'>[qty.pt.orig.utils]</a></h4><h4 ><a class='secnum' style='min-width:110pt'>5.7.2.5.1</a> Same absolute <a class='abbr_ref'>[qty.same.abs.pt.origs]</a></h4><div class='texpara'><div id='lib:same-absolute-point-origins,PointOrigin'><div id='lib:PointOrigin,same-absolute-point-origins'><div class='itemdecl'><div class='marginalizedparent'><a class='itemDeclLink' href='#lib:PointOrigin,same-absolute-point-origins'>🔗</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'>consteval</span> <span class='keyword'>bool</span> <span class='texttt'><i >same-absolute-point-origins</i></span><span class='parenthesis'>(</span>PO1 po1, PO2 po2<span class='parenthesis'>)</span>; <span class='comment'>// <i >exposition only</i></span>
</code></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-units6e7eeedbd8bba0bb28ab0551343c987d23a8a371/source/quantities.tex#L5677'>#</a></div><div class='texpara'><div id='1.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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2;
<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 >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</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> po1<span class='operator'>.</span><i >absolute-point-origin</i> <span class='operator'>=</span><span class='operator'>=</span> po2;
<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> po1 <span class='operator'>=</span><span class='operator'>=</span> po2<span class='operator'>.</span><i >absolute-point-origin</i>;
<span class='keyword'>else</span>
<span class='keyword'>return</span> <span class='literal'>false</span>;
</span></div></div></div></div></div></body></html>

Some files were not shown because too many files have changed in this diff Show More