<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<html>

<style type="text/css">

ins, ins * { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
del, del * { text-decoration:line-through; background-color:#FFA0A0 }

blockquote {
  padding: .5em;
  border: .5em;
  border-color: silver;
  border-left-style: solid;
}

blockquote.std { color: #000000; background-color: #F1F1F1;
  border: 1px solid #D1D1D1;
  padding-left: 0.5em; padding-right: 0.5em; }
blockquote.stdins { text-decoration: underline;
  color: #000000; background-color: #C8FFC8;
  border: 1px solid #B3EBB3; padding: 0.5em; }
blockquote.stddel { text-decoration: line-through;
  color: #000000; background-color: #FFEBFF;
  border: 1px solid #ECD7EC;
  padding-left: 0.5em; padding-right: 0.5em; }

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; }
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'; }
span.textit { font-style: italic; }
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. */

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: #d0d0d0;
    }

    span.mjx-mstyle { color: #d0d0d0 !important }

    a:link { color: #64adff; }
    a:visited { color: #a36ae6; }

    a.hidden_link {
        text-decoration: none;
        color: inherit;
    }

    span.phantom { color: #171717; }

    a.index:before { color: #d0d0d0; background-color: #4b6353; }

    .comment { color: #35da00; }
    .footnote .comment { color: #35da00; }
    .example .comment { color: #35da00; }
    .note .comment { color: #35da00; }

    span.keyword { color: #12cabe; }
    span.parenthesis { color: #ff1515; }
    span.curlybracket { color: #ff1515; }
    span.squarebracket { color: #ff1515; }
    span.literal { color: #dfa837; }
    span.literalterminal { color: #dfa837; }
    span.operator { color: #baa6b9; }
    span.anglebracket { color: #baa6b9; }
    span.preprocessordirective { color: #b27c58; }

    table { border-color: #d0d0d0; }
    td.border { border-color: #d0d0d0; }
    td.border { border-left-color: #d0d0d0; }
    tr.rowsep, td.cline { border-top-color: #d0d0d0; }
    tr.capsep { border-top-color: #d0d0d0; }
    th { border-bottom-color: #d0d0d0; }

    .footnoteSeparator { background-color: #d0d0d0; }

    text { fill: #d0d0d0; }
    path { stroke: #d0d0d0; }
    polygon { stroke: #d0d0d0; fill: #d0d0d0; }
    ellipse { stroke: #d0d0d0; }

    :target { background-color: #4b6345; color: #ffffff; }
    :target .codeblock { background-color: #4b6345; }
    :target ul { background-color: #4b6345; }
    :target a:link { color: #9fcdff; }
    :target a:visited { color: #d39aff; }
    :target a.hidden_link { text-decoration: none; color: inherit; }
    :target span.keyword { color: #32eade; }
    :target span.parenthesis { color: #ff4060; font-weight: bold; }
    :target span.curlybracket { color: #ff4060; font-weight: bold; }
    :target span.squarebracket { color: #ff4060; font-weight: bold; }
    :target span.literal { color: #f0d060; }
    :target span.literalterminal { color: #f0d060; }
    :target span.operator { color: #dac6d9; }
    :target span.anglebracket { color: #dac6d9; }
    :target span.preprocessordirective { color: #e0968f; }
    :target .comment { color: #55ff00; }
    :target .footnote .comment { color: #55ff00; }
    :target .example .comment { color: #55ff00; }
    :target .note .comment { color: #55ff00; }
}
.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-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}
.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-ex-box-test {position: absolute; overflow: hidden; width: 1px; height: 60ex}
.mjx-line-box-test {display: table!important}
.mjx-line-box-test span {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')}

</style>
<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'/>

<title>P3295R3: Freestanding constexpr containers and constexpr exception types</title>
<body>
<h1>Freestanding constexpr containers and constexpr exception types</h1>
Document number: P3295R3<br/>
Date: 2025-03-25<br/>
Reply-to: Ben Craig &lt;ben dot craig at gmail dot com&gt;<br/>
Audience: Library Working Group

<h1>Changes from previous revisions</h1>
<h2>R3</h2>
<ul>
  <li>Making all of vector and string freestanding-consteval.</li>
  <li>Removing <code>constexpr</code> <code>&lt;exceptions&gt;</code> and <code>&lt;stdexcept&gt;</code> parts, as those are already in the standard.</li>
  <li>Bumping feature test macros for memory and string_view headers.</li>
</ul>
<h2>R2</h2>
<ul>
  <li>Better aligning with P3160 and P3418's allocator design.</li>
  <li>Mentioning P3421: Consteval Destructors</li>
</ul>
<h2>R1</h2>
<ul>
  <li>Discussing implementation experience.</li>
  <li>Adding all <code>stdexcept</code> exceptions.</li>
  <li>Discussing default constructed containers and <code>operator delete</code>.</li>
  <li>Discussing methods remaining <code>constexpr</code>.</li>
  <li>Discussing allocator requirements difficulty</li>
  <li>Discussing merge conflicts with in-flight constexpr exception and allocator papers.</li>
  <li>Wording improvements.</li>
</ul>
<h2>R0</h2>
First revision!

<h1>Introduction</h1>
<p>
This proposal helps enable <a href="https://wg21.link/P2996">P2996 reflection</a> and more advanced metaprogramming for freestanding environments.
Specifically, this allows <code>std::vector</code>, <code>std::string</code>, and <code>std::allocator</code> to be used in constant evaluated contexts in freestanding.
</p><p>
As a first approximation, this makes the <code>vector</code> and <code>string</code> facilities <code>consteval</code> in freestanding.
Freestanding implementations that know more about their targets are permitted to provide the full <code>constexpr</code> facilities if they wish.
</p><p>
This paper is attempting to modify the minimum set of facilities possible to freestanding in order to enable reflection, plus some additional exception types that come along for "free".
</p>

<h1>Motivation and Scope</h1>
<p>
Freestanding applications are often unable to allocate memory or throw exceptions at runtime.
No such restriction exists while building the application though.
</p><p>
<a href="https://wg21.link/P2996R2">Reflection in P2996R2</a> contains many <code>consteval</code> functions that return <code>vector&lt;meta::info&gt;</code>, such as <code>members_of</code>.
Those facilities are valuable in freestanding and hosted alike.
</p><p>
This paper would "only" make <code>vector</code> and <code>allocator</code> consteval on freestanding if it reasonably could as a means to limit scope, but <code>vector</code> has functions that throw <code>length_error</code> and <code>out_of_range</code>.
<code>length_error</code> and <code>out_of_range</code> are not in freestanding prior to this paper, so mentioning them renders the program ill-formed, even in a constant evaluation context.
This paper therefore makes those exception types <code>consteval</code> on freestanding.
</p><p>
Similarly, <code>length_error</code> and <code>out_of_range</code> mention <code>string</code>, which is also not yet in freestanding.
Therefore the scope expands to <code>string</code>.
Fortunately, <code>char_traits</code> and most of <code>string_view</code> are already freestanding.
</p><p>
All the <code>&lt;stdexcept&gt;</code> exceptions are receiving the same <code>consteval</code> treatment, since the classes are largely identical other than the class names.
</p><p>
The <i>freestanding-deleted</i> methods of <code>string_view</code> will need to be made <code>consteval</code> on freestanding in order to support <code>string</code>s use cases.
</p><p>
freestanding-consteval additions:
<ul>
<li><code>allocator</code></li>
<li><code>string_view</code> freestanding-deleted members</li>
<li><code>string</code></li>
<li><code>vector</code></li>
<br/>
<li><code>logic_error</code></li>
<li><code>domain_error</code></li>
<li><code>invalid_argument</code></li>
<li><code>length_error</code></li>
<li><code>out_of_range</code></li>
<li><code>runtime_error</code></li>
<li><code>range_error</code></li>
<li><code>overflow_error</code></li>
<li><code>underflow_error</code></li>
</ul>
</p>

<h1>Design Considerations</h1>

<h2>Freestanding all the <code>constexpr</code> things?</h2>
<p>
In <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2268r0.html#constexpr_to_consteval">P2268 Freestanding Roadmap</a>, a strategy is discussed of making everything that is <code>constexpr</code> in the standard library available at compile time via <code>consteval</code>, and those facilities that are also suitable at runtime to be marked <code>constexpr</code> and <code>// freestanding</code>.
That is still the desired goal.
Reaching that goal requires a lot of research and testing.
There are likely other, non-<code>constexpr</code> facilities that the <code>constexpr</code> facilities rely on that would need to be audited as well.
</p><p>
Destructors cannot currently be marked as <code>consteval</code>.
<code>virtual</code> functions that override <code>constexpr</code> methods cannot currently be marked as <code>consteval</code>.
Those restrictions also prevent us from blanket <code>consteval</code>'ing all the <code>constexpr</code> facilities in the standard library.
</p><p>
This paper has chosen to prioritize the reflection subset of that work, rather than block progress on freestanding reflection.
</p>

<h2>Performance regression when porting from freestanding to hosted</h2>
<p>
<code>consteval</code> functions are never evaluated during runtime, but <code>constexpr</code> functions are sometime evaluated during runtime.
A freestanding library using a <code>consteval</code> facility may end up "downgrading" some code from compile time to runtime during a port to a hosted environment due to the change to <code>constexpr</code>.
This can result in worse performance due to the runtime function calls and allocations that were previously compile time function calls and allocations.
</p><p>
In <a href="https://godbolt.org/z/9EGG6r63E">this unoptimized example</a>, we get runtime calls to an allocating constructor and deallocating destructor in the <code>constexpr</code> version compared to the <code>consteval</code> version.
For this example, the difference disappears when optimizations are enabled, but that won't always be the case.
</p>

<h2>Non-transient <code>constexpr</code> allocations</h2>
<p>
<a href="https://wg21.link/P3554R0">Non-transient allocation with vector and basic_string</a> is attempting to make it possible to allow constant evaluated <code>vector</code>s and <code>string</code>s persist into runtime.
I'd like to avoid causing issues for non-transient allocation papers.
</p><p>
We can't rely on the future success of P3544 though.  As a result this paper is making the entirety of <code>vector</code> and <code>basic_string</code> freestanding-consteval.  One non-transient allocation is here, there will be a desire to make non-throwing <code>const</code> methods <code>constexpr</code> on freestanding, rather than freestanding-consteval.
This would make it possible to observe the values in containers with non-transient allocations possible at runtime.
We would still be able to avoid allocations and exceptions at runtime, while also allowing the constant compile time object to be observed.
</p><p>
Instead, we could have marked the functions as <code>constexpr</code> in this paper.  One unfortunate aspect of doing so is that it would make <code>operator[]</code>, <code>front()</code>, and <code>back()</code> as potentially callable at runtime, even though the only possible runtime containers are empty.
LEWG should discuss whether we should prioritize future-proofing the containers or mistake-proofing them.
For now, the paper has chosen to mistake-proof.
</p>

<h2>Freestanding <code>operator delete</code> and default constructed containers</h2>
<p>
Even when marked as <code>consteval</code>, a default constructed <code>std::string</code> or <code>std::vector</code> can persist into runtime.
The destructor for such an object can be executed at runtime.
That destructor will run <code>operator delete</code> on a <code>nullptr</code>.
</p><p>
Freestanding implementations may not have a heap <a href="https://eel.is/c++draft/support.dynamic#new.delete.general-2">[new.delete.general]#2</a>. 
Conforming implementations aren't required to have a useable <code>operator new</code>, but they are required to have an <code>operator delete</code> that can handle a <code>nullptr</code>.
That means that it is acceptable (though unfortunate) that an <code>operator delete</code> "escapes" into runtime.
In practice, I don't think this will be a big problem, as there isn't much that can be done with a default constructed runtime container where all the mutating operations are <code>consteval</code>.
</p><p>
Ideally, this scenario would be ill-formed.
The author has proposed <a href="https://wg21.link/P3421">P3421: Consteval Destructors</a> which would improve this situation.
<code>consteval</code> destructors aren't a requirement for this paper though.
</p>

<h2>Allocator requirements</h2>
<p>
Is <code>std::allocator</code> still an allocator if it can only <code>allocate</code> and <code>deallocate</code> at compile time?
</p><p>
In practice, this seems to work fine in code.
So I'm leaving the requirements alone.
This paper doesn't make any changes to the named requirements for allocators or allocator_traits.
</p><p>
Maybe in the future the standard will be more explicit about when library facilities need to be available at compile time vs. run time.
</p>

<h1>Experience</h1>
<p>
This proposal has been implemented in the Microsoft STL implementation, targeting the Microsoft Windows kernel.
The binaries were compiled with clang-cl, as Microsoft's cl doesn't yet implement <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r0.html">P2564: consteval needs to propagate up</a>.
<code>consteval</code> propagating up was necessary for compressed pair implementations.
Some changes had to be made to vcruntime to move some <code>std::exception</code> code inline.
</p><p>
The libc++ test suite was used to verify the changes.
I modified the tests to verify the compile-time paths (if it wasn't doing so already), and remove the run-time paths.
I would expect production implementations to do this with an `#ifdef` to remove the run-time paths when testing the freestanding implementation.
</p><p>
I will note that the Microsoft Windows kernel implementation does not support C++ exceptions.
As a result, the tests did not exercise any throwing paths.
</p>

<h1>Merge Conflicts</h1>
<h2>Allocators</h2>
<p>
<a href="wg21.link/P3160R2">P3160R2 "An Allocator-Aware inplace_vector"</a> and <a href="https://wg21.link/P3418R0">P3418R0 Wording for P3160R2 inplace_vector's "construct/destroy" alternative</a>
needd to make allocators freestanding, since <code>inplace_vector</code> is already freestanding.
</p><p>
<code>inplace_vector</code> doesn't directly need the <code>allocate</code> and <code>deallocate</code> methods in the allocator.
This paper needs those methods, but only during constant evaluation.
</p><p>
For allocator wording ([allocator.requirements.general] and [allocator.traits.memgers]), this paper's wording matches draft versions of P3160.
This paper's freestanding-consteval changes in [default.allocator] use a different wording technique than the <code>inplace_vector</code> papers, but the intent is the same.
</p>

<h1>Wording</h1>
This paper's wording is based on the working draft N5008.

<h2>Changes in <a href="https://eel.is/c++draft/functions.within.classes">[functions.within.classes]</a></h2>
<p>
Instructions to the editor:
</p><p>
Move [functions.within.classes] below [freestanding.item].
This is so we can use the "freestanding consteval classes" term after it is defined.
Then modify [functions.within.classes] as follows:
</p><p>
<blockquote class="std">
  <div class="para">
    <div class="marginalizedparent"><a class="marginalized" href="#functions.within.classes-1">1</a></div>
    <div class="texpara">
      <div class="sentence">For the sake of exposition, <a href="https://eel.is/c++draft/support">[support]</a> through <a href="https://eel.is/c++draft/exec">[exec]</a>
    and <a href="https://eel.is/c++draft/depr">[depr]</a> do not describe copy/move constructors, assignment
    operators, or (non-virtual) destructors with the same apparent
    semantics as those that can be generated
    by default (<a href="https://eel.is/c++draft/class.copy.ctor">[class.<span class="shy"></span>copy.<span class="shy"></span>ctor]</a>, <a href="https://eel.is/c++draft/class.copy.assign">[class.<span class="shy"></span>copy.<span class="shy"></span>assign]</a>, <a href="https://eel.is/c++draft/class.dtor">[class.<span class="shy"></span>dtor]</a>).</div>
    <div class="sentence">It is unspecified whether
    the implementation provides explicit definitions for such member function
    signatures, or for virtual destructors that can be generated by default.</div>
    <ins>
    <div class="sentence">On freestanding implementations, it is implementation defined whether the copy/move constructors and assignment operators of freestanding consteval classes are immediate functions or constexpr functions.</div>
    </ins>
    </div>
  </div>
</blockquote>
</p>
<h2>Changes in <a href="https://eel.is/c++draft/freestanding.item">[freestanding.item]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to [freestanding.item]:

<blockquote class="std">
  <div class="para" >
    <div class="marginalizedparent"><a class="marginalized" href="#3">3</a></div>
    <div class="texpara">
      <div  class="sentence">Function declarations and function template declarations
    followed by a comment that include <i>freestanding-deleted</i> are
    <a class="hidden_link" href="#def:function,freestanding_deleted"><span ><i>freestanding deleted functions</i></span></a>.</div>

      <div  class="sentence">On freestanding implementations,
    it is <a class="index" ></a>implementation-defined
    whether each entity introduced by a freestanding deleted function
    is a deleted function (<a href="dcl.fct.def.delete">[dcl.<span class="shy"></span>fct.<span class="shy"></span>def.<span class="shy"></span>delete]</a>) or
    whether the requirements are the same as
    the corresponding requirements for a hosted implementation.</div>

      <div  class="note"><div class="texpara">[<i>Note&nbsp;<a href="#note-1">1</a></i>: <div  class="sentence">Deleted definitions reduce the chance of overload resolution silently changing
    when migrating from a freestanding implementation to a hosted implementation.</div> —&nbsp;<i>end note</i>]</div></div>

      <div  class="example"><div class="texpara">[<i>Example&nbsp;<a href="#example-1">1</a></i>: <span class="codeblock"><span class="keyword">double</span> abs(<span class="keyword">double</span> j);           <span class="comment">// freestanding-deleted</span></span> —&nbsp;<i>end example</i>]</div></div>

    </div>
  </div>
  <ins>
    <div class="para" >
      <div class="marginalizedparent"><a class="marginalized">???.a</a></div>
      <div class="texpara">
        <div  class="sentence">Function declarations and function template declarations
      followed by a comment that includes <i>freestanding-consteval</i> are
      <i>freestanding consteval functions</i>.</div>
  
        <div  class="sentence">On freestanding implementations,
      it is <a class="index" ></a>implementation-defined
      whether each entity introduced by a freestanding consteval function
      is an immediate function (<a href="https://eel.is/c++draft/expr.const">[expr.const]</a>) or
      whether the requirements are the same as
      the corresponding requirements for a hosted implementation.</div>
      </div>
    </div>

    <div class="para" >
      <div class="marginalizedparent"><a class="marginalized">???.b</a></div>
      <div class="texpara">
        <div  class="sentence">Class declarations and class template declarations
      followed by a comment that includes <i>freestanding-consteval</i> are
      <i>freestanding consteval classes</i>.</div>
      </div>
    </div>
  </ins>
    <div class="para" >
      <div class="marginalizedparent"><a class="marginalized" href="#4">4</a></div>
      <div class="texpara">
        <div  class="sentence"><a class="index" ></a>A declaration in a synopsis is a freestanding item if
          <ul class="itemize">
            <li >
              <div class="marginalizedparent" style="left:-27mm"><a class="marginalized" href="#4.1">(4.1)</a></div>
              it is followed by a comment that includes <i>freestanding</i>,
            </li>
            <li >
              <div class="marginalizedparent" style="left:-27mm"><a class="marginalized" href="#4.2">(4.2)</a></div>
              it is followed by a comment that includes <i>freestanding-deleted</i>, or
            </li>
            <ins><li >
              <div class="marginalizedparent" style="left:-27mm"><a class="marginalized" href="#4.2">(4.???)</a></div>
              it is followed by a comment that includes <i>freestanding-consteval</i>, or
            </li></ins>
            <li >
              <div class="marginalizedparent" style="left:-27mm"><a class="marginalized" href="#4.3">(4.3)</a></div>
              the header synopsis begins with a comment
    that includes <i>freestanding</i> and
    the declaration is not followed by a comment that includes <i>hosted</i><a class="hidden_link" href="#4.sentence-1">.</a> <div class="texpara"><div  class="note"><div class="texpara">[<i>Note&nbsp;<a href="#note-2">2</a></i>: <div  class="sentence">Declarations followed by <i>hosted</i> in freestanding headers are
    not freestanding items<a class="hidden_link" href="#4.3.sentence-2">.</a></div> <div  class="sentence">As a result, looking up the name of such functions can vary
    between hosted and freestanding implementations<a class="hidden_link" href="#4.3.sentence-3">.</a></div> —&nbsp;<i>end note</i>]</div></div></div></li></ul></div>
    
      <div  class="example"><div class="texpara">[<i>Example&nbsp;<a href="#example-2">2</a></i>: <span class="codeblock"><span class="comment">// all freestanding</span>
    <span class="keyword">namespace</span> std {
    </span> —&nbsp;<i>end example</i>]</div></div></div></div>
    /*...*/

    <div class="para nonNormativeOnly" id="freestanding.item-7"><div class="marginalizedparent"><a class="marginalized" href="#freestanding.item-7">7</a></div><div class="texpara"><div id="freestanding.item-note-3" class="note"><div class="texpara">[<i>Note&nbsp;<a href="#freestanding.item-note-3">3</a></i>: <div id="freestanding.item-7.sentence-1" class="sentence">Freestanding annotations follow some additional exposition conventions
      that do not impose any additional normative requirements<a class="hidden_link" href="#freestanding.item-7.sentence-1">.</a></div> <div id="freestanding.item-7.sentence-2" class="sentence">Header synopses that begin with a comment containing "all freestanding"
      contain no hosted items<ins>,</ins><del> and</del> no freestanding deleted functions<ins>, no freestanding consteval functions, and no freestanding consteval classes</ins><a class="hidden_link" href="#freestanding.item-7.sentence-2">.</a></div> <div id="freestanding.item-7.sentence-3" class="sentence">Header synopses that begin with a comment containing "mostly freestanding"
      contain at least one hosted item<ins>,</ins><del> or</del> freestanding deleted function<ins>, freestanding consteval function, or freestanding consteval class</ins><a class="hidden_link" href="#freestanding.item-7.sentence-3">.</a></div> <div id="freestanding.item-7.sentence-4" class="sentence">Classes and class templates followed by a comment
      containing "partially freestanding"
      contain at least one hosted item<ins>,</ins><del> or</del> freestanding deleted function<ins>, or freestanding consteval function</ins><a class="hidden_link" href="#freestanding.item-7.sentence-4">.</a></div> —&nbsp;<i>end note</i>]</div></div></div></div>



</blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/compliance">[compliance]</a></h2>
Drafting note: <code>&lt;string&gt;</code> and <code>&lt;memory&gt;</code> are already freestanding headers.<br/>

Add new rows to the "C++ headers for freestanding implementations" table:
<table style="border: 1px solid black">
<thead>
<tr style="border: 1px solid black">
<th colspan="2" style="text-align: center">Subclause</th><th style="text-align: center">Header(s)</th>
</tr>
</thead>
<tbody>
<tr style="border: 1px solid black">
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
</tr>
<tr style="border: 1px solid black">
<td style="padding: 0ex 1ex 0ex 1ex"><ins>?.? <a href="https://eel.is/c++draft/std.exceptions">[std.exceptions]</a></ins></td>
<td style="padding: 0ex 1ex 0ex 1ex"><ins>Exception classes</ins></td>
<td style="padding: 0ex 1ex 0ex 1ex"><ins><tt>&lt;stdexcept&gt;</tt></ins></td>
</tr>
<tr style="border: 1px solid black">
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
</tr>
<tr style="border: 1px solid black">
<td style="padding: 0ex 1ex 0ex 1ex"><ins>?.? <a href="https://eel.is/c++draft/vector.syn">[vector.syn]</a></ins></td>
<td style="padding: 0ex 1ex 0ex 1ex"><ins>Header &lt;vector&gt; synopsis </ins></td>
<td style="padding: 0ex 1ex 0ex 1ex"><ins><tt>&lt;vector&gt;</tt></ins></td>
</tr>
<tr style="border: 1px solid black">
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
<td style="padding: 0ex 1ex 0ex 1ex">[&hellip;]</td>
</tr>
</tbody>
</table>

<h2>Changes in <a href="https://eel.is/c++draft/version.syn">[version.syn]</a></h2>
Instructions to the editor:<br/>
Add the following macros to <a href="https://eel.is/c++draft/version.syn">[version.syn]</a>:
<blockquote class="stdins">
<pre class='codeblock'>
#define __cpp_lib_freestanding_consteval_allocator 20XXXXL // freestanding, also in &lt;memory&gt;
#define __cpp_lib_freestanding_consteval_string 20XXXXL // freestanding, also in &lt;string&gt;
#define __cpp_lib_freestanding_stdexcept 20XXXXL // freestanding, also in &lt;stdexcept&gt;
#define __cpp_lib_freestanding_vector 20XXXXL // freestanding, also in &lt;vector&gt;
</pre>
</blockquote>

Bump the constants on the following macros:
<blockquote class="std">
<pre class='codeblock'>
#define __cpp_lib_freestanding_memory               <del>202502L</del><ins>20XXXXL</ins> // freestanding, also in &lt;memory&gt;
/*...*/
#define __cpp_lib_freestanding_string_view          <del>202311L</del><ins>20XXXXL</ins> // freestanding, also in &lt;string_view&gt;
</pre>
</blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/stdexcept.syn">[stdexcept.syn]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/stdexcept.syn">[stdexcept.syn]</a>:
<blockquote class="std"><pre class='codeblock'>
namespace std {
  <span class="keyword">class</span> logic_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> domain_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> invalid_argument;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> length_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> out_of_range;<ins> <i>// freestanding-consteval</i></ins>
  <span class="keyword">class</span> runtime_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> range_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> overflow_error;<ins> <i>// freestanding-consteval</i></ins>
    <span class="keyword">class</span> underflow_error;<ins> <i>// freestanding-consteval</i></ins>
}
</pre></blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/logic.error">[logic.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/logic.error">[logic.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> logic_error : <span class="keyword">public</span> exception {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> logic_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> logic_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>


<h2>Changes in <a href="https://eel.is/c++draft/domain.error">[domain.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/domain.error">[domain.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> domain_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> domain_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> domain_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>


<h2>Changes in <a href="https://eel.is/c++draft/invalid.argument">[invalid.argument]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/invalid.argument">[invalid.argument]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> invalid_argument : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> invalid_argument(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> invalid_argument(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/length.error">[length.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/length.error">[length.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> length_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> length_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> length_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>


<h2>Changes in <a href="https://eel.is/c++draft/out.of.range">[out.of.range]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/out.of.range">[out.of.range]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> out_of_range : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> out_of_range(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> out_of_range(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>




<h2>Changes in <a href="https://eel.is/c++draft/runtime.error">[runtime.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/runtime.error">[runtime.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> runtime_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> runtime_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> runtime_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>




<h2>Changes in <a href="https://eel.is/c++draft/range.error">[range.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/range.error">[range.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> range_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> range_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> range_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>





<h2>Changes in <a href="https://eel.is/c++draft/overflow.error">[overflow.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/overflow.error">[overflow.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> overflow_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> overflow_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> overflow_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>





<h2>Changes in <a href="https://eel.is/c++draft/underflow.error">[underflow.error]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/underflow.error">[underflow.error]</a>:
<blockquote class="std"><pre class='codeblock'>
<span class="keyword">namespace</span> std {
  <span class="keyword">class</span> underflow_error : <span class="keyword">public</span> logic_error {
  <span class="keyword">public</span>:
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> underflow_error(<span class="keyword">const</span> string&amp; what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
    <span class="keyword">constexpr</span> <span class="keyword">explicit</span> underflow_error(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> what_arg);<ins> <span class="comment">// freestanding-consteval</span></ins>
  };
}
</pre></blockquote>


<h2>Changes in <a href="https://eel.is/c++draft/memory.syn">[memory.syn]</a></h2>
Instructions to the editor:<br/>
Please make the following edit to <a href="https://eel.is/c++draft/memory.syn">[memory.syn]</a>:
<blockquote class="std">
<pre class='codeblock'>
  <span class="comment">// <a href="https://wg21.link/default.allocator" title="20.2.10 The default allocator">[default.<span class="shy"></span>allocator]</a>, the default allocator</span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T<span class="anglebracket">&gt;</span> <span class="keyword">class</span> allocator;<ins> <i>// partially freestanding</i></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> U<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="keyword">operator</span>==(<span class="keyword">const</span> allocator<span class="anglebracket">&lt;</span>T<span class="anglebracket">&gt;</span>&amp;, <span class="keyword">const</span> allocator<span class="anglebracket">&lt;</span>U<span class="anglebracket">&gt;</span>&amp;) <span class="keyword">noexcept</span>;<ins> <i>// freestanding</i></ins>
</pre>
</blockquote>


<h2>Changes in <a href="https://eel.is/c++draft/default.allocator">[default.allocator]</a></h2>
Instructions to the editor:<br/>
Please make the following edit to <a href="https://eel.is/c++draft/default.allocator">[default.allocator]</a>:
<blockquote class="std">
  <span class="codeblock"><span class="keyword">namespace</span> std <span class="curlybracket">{</span>
    <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T<span class="anglebracket">&gt;</span> <span class="keyword">class</span> allocator <span class="curlybracket">{</span>
    <span class="keyword">public</span><span class="operator">:</span>
      <span class="keyword">using</span> value_type                             <span class="operator">=</span> T;
      <span class="keyword">using</span> size_type                              <span class="operator">=</span> size_t;
      <span class="keyword">using</span> difference_type                        <span class="operator">=</span> ptrdiff_t;
      <span class="keyword">using</span> propagate_on_container_move_assignment <span class="operator">=</span> true_type;
  
      <span class="keyword">constexpr</span> allocator<span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="keyword">noexcept</span>;
      <span class="keyword">constexpr</span> allocator<span class="parenthesis">(</span><span class="keyword">const</span> allocator<span class="operator">&amp;</span><span class="parenthesis">)</span> <span class="keyword">noexcept</span>;
      <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> U<span class="anglebracket">&gt;</span> <span class="keyword">constexpr</span> allocator<span class="parenthesis">(</span><span class="keyword">const</span> allocator<span class="anglebracket">&lt;</span>U<span class="anglebracket">&gt;</span><span class="operator">&amp;</span><span class="parenthesis">)</span> <span class="keyword">noexcept</span>;
      <span class="keyword">constexpr</span> <span class="operator">~</span>allocator<span class="parenthesis">(</span><span class="parenthesis">)</span>;
      <span class="keyword">constexpr</span> allocator<span class="operator">&amp;</span> <span class="keyword">operator</span><span class="operator">=</span><span class="parenthesis">(</span><span class="keyword">const</span> allocator<span class="operator">&amp;</span><span class="parenthesis">)</span> <span class="operator">=</span> <span class="keyword">default</span>;
  
      <span class="keyword">constexpr</span> T<span class="operator">*</span> allocate<span class="parenthesis">(</span>size_t n<span class="parenthesis">)</span>;<ins> <i>// freestanding-consteval</i></ins>
      <span class="keyword">constexpr</span> allocation_result<span class="anglebracket">&lt;</span>T<span class="operator">*</span><span class="anglebracket">&gt;</span> allocate_at_least<span class="parenthesis">(</span>size_t n<span class="parenthesis">)</span>;<ins> <i>// freestanding-consteval</i></ins>
      <span class="keyword">constexpr</span> <span class="keyword">void</span> deallocate<span class="parenthesis">(</span>T<span class="operator">*</span> p, size_t n<span class="parenthesis">)</span>;<ins> <i>// freestanding-consteval</i></ins>
    <span class="curlybracket">}</span>;
  <span class="curlybracket">}</span></span></blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/string.view.template.general">[string.view.template.general]</a></h2>
Instructions to the editor:<br/>
Please make the following edit to <a href="https://eel.is/c++draft/string.view.template.general">[string.view.template.general]</a>:
<blockquote class="std">
<pre class='codeblock'>
    <span class="comment">// <a href="#string.view.access" title="23.3.3.6 Element access">[string.<span class="shy"></span>view.<span class="shy"></span>access]</a>, element access</span>
    <span class="keyword">constexpr</span> const_reference <span class="keyword">operator</span><span class="squarebracket">[</span><span class="squarebracket">]</span>(size_type pos) <span class="keyword">const</span>;
    <span class="keyword">constexpr</span> const_reference at(size_type pos) <span class="keyword">const</span>;                  <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>
    <span class="keyword">constexpr</span> const_reference front() <span class="keyword">const</span>;
    <span class="keyword">constexpr</span> const_reference back() <span class="keyword">const</span>;
    <span class="keyword">constexpr</span> const_pointer data() <span class="keyword">const</span> <span class="keyword">noexcept</span>;

    <span class="comment">// <a href="#string.view.modifiers" title="23.3.3.7 Modifiers">[string.<span class="shy"></span>view.<span class="shy"></span>modifiers]</a>, modifiers</span>
    <span class="keyword">constexpr</span> <span class="keyword">void</span> remove_prefix(size_type n);
    <span class="keyword">constexpr</span> <span class="keyword">void</span> remove_suffix(size_type n);
    <span class="keyword">constexpr</span> <span class="keyword">void</span> swap(basic_string_view&amp; s) <span class="keyword">noexcept</span>;

    <span class="comment">// <a href="#string.view.ops" title="23.3.3.8 String operations">[string.<span class="shy"></span>view.<span class="shy"></span>ops]</a>, string operations</span>
    <span class="keyword">constexpr</span> size_type copy(charT<span class="operator">*</span> s, size_type n,
                             size_type pos = <span class="literal">0</span>) <span class="keyword">const</span>;                  <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>

    <span class="keyword">constexpr</span> basic_string_view substr(size_type pos = <span class="literal">0</span>,
                                       size_type n = npos) <span class="keyword">const</span>;       <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>

    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(basic_string_view s) <span class="keyword">const</span> <span class="keyword">noexcept</span>;
    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(size_type pos1, size_type n1,
                          basic_string_view s) <span class="keyword">const</span>;                   <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>
    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(size_type pos1, size_type n1, basic_string_view s,
                          size_type pos2, size_type n2) <span class="keyword">const</span>;          <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>
    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(<span class="keyword">const</span> charT<span class="operator">*</span> s) <span class="keyword">const</span>;
    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(size_type pos1, size_type n1,
                          <span class="keyword">const</span> charT<span class="operator">*</span> s) <span class="keyword">const</span>;                        <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>
    <span class="keyword">constexpr</span> <span class="keyword">int</span> compare(size_type pos1, size_type n1, <span class="keyword">const</span> charT<span class="operator">*</span> s,
                          size_type n2) <span class="keyword">const</span>;                          <span class="comment">// freestanding-<del>deleted</del><ins>consteval</ins></span>
</pre>
</blockquote>

<h2>Changes in <a href="https://eel.is/c++draft/string.syn">[string.syn]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/string.syn">[string.syn]</a>:
<blockquote class="std">
<pre class='codeblock'>

  <span class="comment">// <a href="basic.string" title="23.4.3 Class template basic_­string">[basic.<span class="shy"></span>string]</a>, <span class="tcode_in_codeblock">basic_<span class="shy"></span>string</span></span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits = char_traits<span class="anglebracket">&lt;</span>charT<span class="anglebracket">&gt;</span>, <span class="keyword">class</span> Allocator = allocator<span class="anglebracket">&lt;</span>charT<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span>
    <span class="keyword">class</span> basic_string;<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; lhs,
                <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; lhs,
                basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> charT<span class="operator">*</span> lhs,
                <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> charT<span class="operator">*</span> lhs,
                basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(charT lhs,
                <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(charT lhs,
                basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                <span class="keyword">const</span> charT<span class="operator">*</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; lhs,
                <span class="keyword">const</span> charT<span class="operator">*</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                charT rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; lhs,
                charT rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                type_identity_t<span class="anglebracket">&lt;</span>basic_string_view<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; lhs,
                type_identity_t<span class="anglebracket">&lt;</span>basic_string_view<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(type_identity_t<span class="anglebracket">&lt;</span>basic_string_view<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span> lhs,
                <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>
      <span class="keyword">operator</span><span class="operator">+</span>(type_identity_t<span class="anglebracket">&lt;</span>basic_string_view<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span> lhs,
                basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp;&amp; rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">bool</span>
      <span class="keyword">operator</span>==(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                 <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs) <span class="keyword">noexcept</span>;<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="keyword">operator</span>==(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                              <span class="keyword">const</span> charT<span class="operator">*</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <i><span class="texttt">see below</span></i> <span class="keyword">operator</span><span class="anglebracket">&lt;</span>=<span class="anglebracket">&gt;</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                                    <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs) <span class="keyword">noexcept</span>;<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <i><span class="texttt">see below</span></i> <span class="keyword">operator</span><span class="anglebracket">&lt;</span>=<span class="anglebracket">&gt;</span>(<span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
                                    <span class="keyword">const</span> charT<span class="operator">*</span> rhs);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="comment">// <a href="string.special" title="23.4.4.3 swap">[string.<span class="shy"></span>special]</a>, swap</span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">void</span>
      swap(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; lhs,
           basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; rhs)
        <span class="keyword">noexcept</span>(<span class="keyword">noexcept</span>(lhs<span class="operator">.</span>swap(rhs)));<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="comment">// <a href="string.io" title="23.4.4.4 Inserters and extractors">[string.<span class="shy"></span>io]</a>, inserters and extractors</span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      <span class="keyword">operator</span><span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span>(basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp; is,
                 basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str);
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_ostream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      <span class="keyword">operator</span><span class="anglebracket">&lt;</span><span class="anglebracket">&lt;</span>(basic_ostream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp; os,
                 <span class="keyword">const</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str);
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      getline(basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp; is,
              basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str,
              charT delim);
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      getline(basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;&amp; is,
              basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str,
              charT delim);
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      getline(basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp; is,
              basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str);
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;
      getline(basic_istream<span class="anglebracket">&lt;</span>charT, traits<span class="anglebracket">&gt;</span>&amp;&amp; is,
              basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; str);

  <span class="comment">// <a href="string.erasure" title="23.4.4.5 Erasure">[string.<span class="shy"></span>erasure]</a>, erasure</span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator, <span class="keyword">class</span> U = charT<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">typename</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span><span class="operator">::</span>size_type
      erase(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; c, <span class="keyword">const</span> U&amp; value);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> charT, <span class="keyword">class</span> traits, <span class="keyword">class</span> Allocator, <span class="keyword">class</span> Predicate<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">typename</span> basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span><span class="operator">::</span>size_type
      erase_if(basic_string<span class="anglebracket">&lt;</span>charT, traits, Allocator<span class="anglebracket">&gt;</span>&amp; c, Predicate pred);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="comment">// <span class="tcode_in_codeblock">basic_<span class="shy"></span>string</span> <a href="dcl.typedef#nt:typedef-name" title="9.2.4 The typedef specifier [dcl.typedef]"><span id="ntref:typedef-name"><span class="textsf"><i>typedef-name</i></span></span></a><i>s</i></span>
  <span class="keyword">using</span> <span id="lib:string"><a class="hidden_link" href="#lib:string" title="23.4.2 Header <string> synopsis [string.syn]">string</a></span>    = basic_string<span class="anglebracket">&lt;</span><span class="keyword">char</span><span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding</span></ins>
  <span class="keyword">using</span> <span id="lib:u8string"><a class="hidden_link" href="#lib:u8string" title="23.4.2 Header <string> synopsis [string.syn]">u8string</a></span>  = basic_string<span class="anglebracket">&lt;</span><span class="keyword">char8_t</span><span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding</span></ins>
  <span class="keyword">using</span> <span id="lib:u16string"><a class="hidden_link" href="#lib:u16string" title="23.4.2 Header <string> synopsis [string.syn]">u16string</a></span> = basic_string<span class="anglebracket">&lt;</span><span class="keyword">char16_t</span><span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding</span></ins>
  <span class="keyword">using</span> <span id="lib:u32string"><a class="hidden_link" href="#lib:u32string" title="23.4.2 Header <string> synopsis [string.syn]">u32string</a></span> = basic_string<span class="anglebracket">&lt;</span><span class="keyword">char32_t</span><span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding</span></ins>
  <span class="keyword">using</span> <span id="lib:wstring"><a class="hidden_link" href="#lib:wstring" title="23.4.2 Header <string> synopsis [string.syn]">wstring</a></span>   = basic_string<span class="anglebracket">&lt;</span><span class="keyword">wchar_t</span><span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding</span></ins>
/* ... */
  <span class="keyword">inline</span> <span class="keyword">namespace</span> literals {
    <span class="keyword">inline</span> <span class="keyword">namespace</span> string_literals {
      <span class="comment">// <a href="basic.string.literals" title="23.4.7 Suffix for basic_­string literals">[basic.<span class="shy"></span>string.<span class="shy"></span>literals]</a>, suffix for <span class="tcode_in_codeblock">basic_<span class="shy"></span>string</span> literals</span>
      <span class="keyword">constexpr</span> string    <span class="keyword">operator</span><span class="literal">""s</span>(<span class="keyword">const</span> <span class="keyword">char</span><span class="operator">*</span> str, size_t len);<ins> <span class="comment">// freestanding-consteval</span></ins>
      <span class="keyword">constexpr</span> u8string  <span class="keyword">operator</span><span class="literal">""s</span>(<span class="keyword">const</span> <span class="keyword">char8_t</span><span class="operator">*</span> str, size_t len);<ins> <span class="comment">// freestanding-consteval</span></ins>
      <span class="keyword">constexpr</span> u16string <span class="keyword">operator</span><span class="literal">""s</span>(<span class="keyword">const</span> <span class="keyword">char16_t</span><span class="operator">*</span> str, size_t len);<ins> <span class="comment">// freestanding-consteval</span></ins>
      <span class="keyword">constexpr</span> u32string <span class="keyword">operator</span><span class="literal">""s</span>(<span class="keyword">const</span> <span class="keyword">char32_t</span><span class="operator">*</span> str, size_t len);<ins> <span class="comment">// freestanding-consteval</span></ins>
      <span class="keyword">constexpr</span> wstring   <span class="keyword">operator</span><span class="literal">""s</span>(<span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="operator">*</span> str, size_t len);<ins> <span class="comment">// freestanding-consteval</span></ins>
    }
  }
</pre>
</blockquote>






<h2>Changes in <a href="https://eel.is/c++draft/basic.string">[basic.string]</a></h2>
Instructions to the editor:<br/>
Please add the following paragraph to the end of <a href="https://eel.is/c++draft/basic.string">[basic.string]</a>:
<blockquote class="stdins">
  <div class="para"><div class="marginalizedparent"><a class="marginalized" href="#general-2">?</a></div><div class="texpara"><div id="general-2.sentence-1" class="sentence">Other than the destructor, all member functions and member function templates in the class template <code>basic_string</code> are freestanding consteval functions ([freestanding.item]).</code></div></div></div>
</blockquote>















<h2>Changes in <a href="https://eel.is/c++draft/vector.syn">[vector.syn]</a></h2>
Instructions to the editor:<br/>
Please make the following edits to <a href="https://eel.is/c++draft/vector.syn">[vector.syn]</a>:
<blockquote class="std">
<pre class='codeblock'>

  <span class="comment">// <a href="vector" title="24.3.11 Class template vector">[vector]</a>, class template <span class="tcode_in_codeblock">vector</span></span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator = allocator<span class="anglebracket">&lt;</span>T<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span> <span class="keyword">class</span> vector;<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="keyword">operator</span>==(<span class="keyword">const</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; x, <span class="keyword">const</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; y);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <i>synth-three-way-result</i><span class="anglebracket">&lt;</span>T<span class="anglebracket">&gt;</span> <span class="keyword">operator</span><span class="anglebracket">&lt;</span>=<span class="anglebracket">&gt;</span>(<span class="keyword">const</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; x,
                                                    <span class="keyword">const</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; y);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">void</span> swap(vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; x, vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; y)
      <span class="keyword">noexcept</span>(<span class="keyword">noexcept</span>(x<span class="operator">.</span>swap(y)));<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="comment">// <a href="vector.erasure" title="24.3.11.6 Erasure">[vector.<span class="shy"></span>erasure]</a>, erasure</span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator, <span class="keyword">class</span> U = T<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">typename</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span><span class="operator">::</span>size_type
      erase(vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; c, <span class="keyword">const</span> U&amp; value);<ins> <span class="comment">// freestanding-consteval</span></ins>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T, <span class="keyword">class</span> Allocator, <span class="keyword">class</span> Predicate<span class="anglebracket">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">typename</span> vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span><span class="operator">::</span>size_type
      erase_if(vector<span class="anglebracket">&lt;</span>T, Allocator<span class="anglebracket">&gt;</span>&amp; c, Predicate pred);<ins> <span class="comment">// freestanding-consteval</span></ins>

  <span class="keyword">namespace</span> pmr {
    <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> T<span class="anglebracket">&gt;</span>
      <span class="keyword">using</span> vector = std<span class="operator">::</span>vector<span class="anglebracket">&lt;</span>T, polymorphic_allocator<span class="anglebracket">&lt;</span>T<span class="anglebracket">&gt;</span><span class="anglebracket">&gt;</span>;
  }

  <span class="comment">// <a href="vector.bool" title="24.3.12 Specialization of vector for bool">[vector.<span class="shy"></span>bool]</a>, specialization of <span class="tcode_in_codeblock">vector</span> for <span class="tcode_in_codeblock">bool</span></span>
  <span class="comment">// <a href="vector.bool.pspc" title="24.3.12.1 Partial class template specialization vector<bool, Allocator>">[vector.<span class="shy"></span>bool.<span class="shy"></span>pspc]</a>, partial class template specialization <span class="tcode_in_codeblock">vector&lt;bool, Allocator&gt;</span></span>
  <span class="keyword">template</span><span class="anglebracket">&lt;</span><span class="keyword">class</span> Allocator<span class="anglebracket">&gt;</span>
    <span class="keyword">class</span> vector<span class="anglebracket">&lt;</span><span class="keyword">bool</span>, Allocator<span class="anglebracket">&gt;</span>;<ins> <span class="comment">// freestanding-consteval</span></ins>
</pre>
</blockquote>






<h2>Changes in <a href="https://eel.is/c++draft/vector">[vector]</a></h2>
Instructions to the editor:<br/>
Please add the following paragraph to the end of <a href="https://eel.is/c++draft/vector">[vector]</a>:
<blockquote class="stdins">
  <div class="para"><div class="marginalizedparent"><a class="marginalized" href="#general-2">?</a></div><div class="texpara"><div id="general-2.sentence-1" class="sentence">Other than the destructor, all member functions and member function templates in the class template <code>vector</code> are freestanding consteval functions ([freestanding.item]).</code></div></div></div>
</blockquote>








<h2>Changes in <a href="https://eel.is/c++draft/vector.bool">[vector.bool]</a></h2>
Instructions to the editor:<br/>
Please add the following paragraph to the end of <a href="https://eel.is/c++draft/vector.bool">[vector.bool]</a>:
<blockquote class="stdins">
  <div class="para"><div class="marginalizedparent"><a class="marginalized" href="#general-2">?</a></div><div class="texpara"><div id="general-2.sentence-1" class="sentence">Other than the destructor, all member functions and member function templates in <code>vector&lt;bool&gt;</code> are freestanding consteval functions ([freestanding.item]).</code></div></div></div>
</blockquote>


<h1>Disclaimer</h1>
The opinions in this paper are my own and do not reflect the views or positions of my employer, CrowdStrike, Inc.

</body>
</html>
