<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="mpark/wg21" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <meta name="dcterms.date" content="2025-06-18" />
  <title>Final Adjustments to C++26 Reflection</title>
  <style>
      code{white-space: pre-wrap;}
      span.smallcaps{font-variant: small-caps;}
      span.underline{text-decoration: underline;}
      div.column{display: inline-block; vertical-align: top; width: 50%;}
      div.csl-block{margin-left: 1.5em;}
      ul.task-list{list-style: none;}
      pre > code.sourceCode { white-space: pre; position: relative; }
      pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
      pre > code.sourceCode > span:empty { height: 1.2em; }
      .sourceCode { overflow: visible; }
      code.sourceCode > span { color: inherit; text-decoration: inherit; }
      div.sourceCode { margin: 1em 0; }
      pre.sourceCode { margin: 0; }
      @media screen {
      div.sourceCode { overflow: auto; }
      }
      @media print {
      pre > code.sourceCode { white-space: pre-wrap; }
      pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
      }
      pre.numberSource code
        { counter-reset: source-line 0; }
      pre.numberSource code > span
        { position: relative; left: -4em; counter-increment: source-line; }
      pre.numberSource code > span > a:first-child::before
        { content: counter(source-line);
          position: relative; left: -1em; text-align: right; vertical-align: baseline;
          border: none; display: inline-block;
          -webkit-touch-callout: none; -webkit-user-select: none;
          -khtml-user-select: none; -moz-user-select: none;
          -ms-user-select: none; user-select: none;
          padding: 0 4px; width: 4em;
          color: #aaaaaa;
        }
      pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
      div.sourceCode
        {  background-color: #f6f8fa; }
      @media screen {
      pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
      }
      code span { } /* Normal */
      code span.al { color: #ff0000; } /* Alert */
      code span.an { } /* Annotation */
      code span.at { } /* Attribute */
      code span.bn { color: #9f6807; } /* BaseN */
      code span.bu { color: #9f6807; } /* BuiltIn */
      code span.cf { color: #00607c; } /* ControlFlow */
      code span.ch { color: #9f6807; } /* Char */
      code span.cn { } /* Constant */
      code span.co { color: #008000; font-style: italic; } /* Comment */
      code span.cv { color: #008000; font-style: italic; } /* CommentVar */
      code span.do { color: #008000; } /* Documentation */
      code span.dt { color: #00607c; } /* DataType */
      code span.dv { color: #9f6807; } /* DecVal */
      code span.er { color: #ff0000; font-weight: bold; } /* Error */
      code span.ex { } /* Extension */
      code span.fl { color: #9f6807; } /* Float */
      code span.fu { } /* Function */
      code span.im { } /* Import */
      code span.in { color: #008000; } /* Information */
      code span.kw { color: #00607c; } /* Keyword */
      code span.op { color: #af1915; } /* Operator */
      code span.ot { } /* Other */
      code span.pp { color: #6f4e37; } /* Preprocessor */
      code span.re { } /* RegionMarker */
      code span.sc { color: #9f6807; } /* SpecialChar */
      code span.ss { color: #9f6807; } /* SpecialString */
      code span.st { color: #9f6807; } /* String */
      code span.va { } /* Variable */
      code span.vs { color: #9f6807; } /* VerbatimString */
      code span.wa { color: #008000; font-weight: bold; } /* Warning */
      code.diff {color: #898887}
      code.diff span.va {color: #006e28}
      code.diff span.st {color: #bf0303}
  </style>
  <style type="text/css">
body {
margin: 5em;
font-family: serif;

hyphens: auto;
line-height: 1.35;
text-align: justify;
}
@media screen and (max-width: 30em) {
body {
margin: 1.5em;
}
}
div.wrapper {
max-width: 60em;
margin: auto;
}
ul {
list-style-type: none;
padding-left: 2em;
margin-top: -0.2em;
margin-bottom: -0.2em;
}
a {
text-decoration: none;
color: #4183C4;
}
a.hidden_link {
text-decoration: none;
color: inherit;
}
li {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
h1, h2, h3, h4 {
position: relative;
line-height: 1;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
font-family: sans-serif;
font-weight: normal;
font-size: 83%;
}
a.self-link:hover { opacity: 1; }
a.self-link::before { content: "§"; }
ul > li:before {
content: "\2014";
position: absolute;
margin-left: -1.5em;
}
: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; }
.header-section-number { 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; }
span.marginalizedparent {
position: relative;
left: -5em;
}
li span.marginalizedparent { left: -7em; }
li ul > li span.marginalizedparent { left: -9em; }
li ul > li ul > li span.marginalizedparent { left: -11em; }
li ul > li ul > li ul > li span.marginalizedparent { left: -13em; }
div.footnoteNumberParent {
position: relative;
left: -4.7em;
}
a.marginalized {
position: absolute;
font-size: 75%;
text-align: right;
width: 5em;
}
a.enumerated_item_num {
position: relative;
left: -3.5em;
display: inline-block;
margin-right: -3em;
text-align: right;
width: 3em;
}
div.para { margin-bottom: 0.6em; margin-top: 0.6em; text-align: justify; }
div.section { text-align: justify; }
div.sentence { display: inline; }
span.indexparent {
display: inline;
position: relative;
float: right;
right: -1em;
}
a.index {
position: absolute;
display: none;
}
a.index:before { content: "⟵"; }

a.index:target {
display: inline;
}
.indexitems {
margin-left: 2em;
text-indent: -2em;
}
div.itemdescr {
margin-left: 3em;
}
.bnf {
font-family: serif;
margin-left: 40pt;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.ncbnf {
font-family: serif;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 40pt;
}
.ncsimplebnf {
font-family: serif;
font-style: italic;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 40pt;
background: inherit; 
}
span.textnormal {
font-style: normal;
font-family: serif;
white-space: normal;
display: inline-block;
}
span.rlap {
display: inline-block;
width: 0px;
}
span.descr { font-style: normal; font-family: serif; }
span.grammarterm { font-style: italic; }
span.term { font-style: italic; }
span.terminal { font-family: monospace; font-style: normal; }
span.nonterminal { font-style: italic; }
span.tcode { font-family: monospace; font-style: normal; }
span.textbf { font-weight: bold; }
span.textsc { font-variant: small-caps; }
a.nontermdef { font-style: italic; font-family: serif; }
span.emph { font-style: italic; }
span.techterm { font-style: italic; }
span.mathit { font-style: italic; }
span.mathsf { font-family: sans-serif; }
span.mathrm { font-family: serif; font-style: normal; }
span.textrm { font-family: serif; }
span.textsl { font-style: italic; }
span.mathtt { font-family: monospace; font-style: normal; }
span.mbox { font-family: serif; font-style: normal; }
span.ungap { display: inline-block; width: 2pt; }
span.textit { font-style: italic; }
span.texttt { font-family: monospace; }
span.tcode_in_codeblock { font-family: monospace; font-style: normal; }
span.phantom { color: white; }

span.math { font-style: normal; }
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 {
margin-left: 1.2em;
line-height: 127%;
}
.outputblock {
margin-left: 1.2em;
line-height: 127%;
}
div.itemdecl {
margin-top: 2ex;
}
code.itemdeclcode {
white-space: pre;
display: block;
}
span.textsuperscript {
vertical-align: super;
font-size: smaller;
line-height: 0;
}
.footnotenum { vertical-align: super; font-size: smaller; line-height: 0; }
.footnote {
font-size: small;
margin-left: 2em;
margin-right: 2em;
margin-top: 0.6em;
margin-bottom: 0.6em;
}
div.minipage {
display: inline-block;
margin-right: 3em;
}
div.numberedTable {
text-align: center;
margin: 2em;
}
div.figure {
text-align: center;
margin: 2em;
}
table {
border: 1px solid black;
border-collapse: collapse;
margin-left: auto;
margin-right: auto;
margin-top: 0.8em;
text-align: left;
hyphens: none; 
}
td, th {
padding-left: 1em;
padding-right: 1em;
vertical-align: top;
}
td.empty {
padding: 0px;
padding-left: 1px;
}
td.left {
text-align: left;
}
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.even, tr.odd {
border-bottom: 1px solid black;
}
tr.capsep {
border-top: 3px solid black;
border-top-style: double;
}
tr.header {
border-bottom: 3px solid black;
border-bottom-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 {
display: block;
margin-left: 2em;
margin-bottom: 1em;
margin-top: 1em;
}
ol.enumeratea { list-style-type: none; background: inherit; }
ol.enumerate { list-style-type: none; background: inherit; }

code.sourceCode > span { display: inline; }
</style>
  <style type="text/css">a {
color : #4183C4;
text-decoration: underline;
}
a.marginalized {
text-decoration: none;
}
a.self-link {
text-decoration: none;
}
h1#toctitle {
border-bottom: 1px solid #cccccc;
}
#TOC li {
margin-top: 1px;
margin-bottom: 1px;
}
#TOC ul>li:before { display: none; }
h3.subtitle { margin-top: -15px; }
h1:target { background-color: transparent; }
h2:target { background-color: transparent; }
h3:target { background-color: transparent; }
h4:target { background-color: transparent; }
h5:target { background-color: transparent; }
h6:target { background-color: transparent; }
code span.co { font-family: monospace; }
table tr {
background-color: white;
}
table tr:nth-child(2n) {
background-color: #f6f8fa;
}
#title-block-header > table tr:nth-child(2n) {
background-color: white;
}
td > div.sourceCode {
background-color: inherit;
}
td > div > div.sourceCode {
background-color: inherit;
}
table {
border-collapse: collapse;
}
table td, table th {
border: 1px solid #cccccc;
}
table th {
border-bottom: 1px solid black;
text-align: center;
}
table tr:first-child th {
border-top: 0;
}
table tr:last-child td {
border-bottom: 0;
}
table tr td:first-child,
table tr th:first-child {
border-left: 0;
}
table tr td:last-child,
table tr th:last-child {
border-right: 0;
}
table tbody tr:first-child td {
border-top: 1px solid black;
}
#title-block-header td { border: 0; }
@media all {
body {
margin: 2em;
}
}
@media screen and (min-width: 480px) {
body {
margin: 5em;
}
}
#refs code{padding-left: 0px; text-indent: 0px;}
:root {
--diff-ins: #C9FBC9;
--diff-strongins: #acf2bd;
--diff-del: #FFC8EB;
--diff-strongdel: #ff8888;
}
span.diffins {
background-color: var(--diff-strongins);
}
span.diffdel {
background-color: var(--diff-strongdel);
}
div.rm { text-decoration: line-through; }
div.rm code.sourceCode { text-decoration: line-through; }
div.addu, span.addu {
color: #006e28;
background-color: var(--diff-ins);
}

div.rm pre, div.add pre { background-color: #f6f8fa; }
div.addu pre { background-color: var(--diff-ins); }
div.addu td pre { background-color: inherit; }
div.add, div.add pre { background-color: var(--diff-ins); }
div.addu blockquote {
border-left: 4px solid #00a000;
padding: 0 15px;
color: #006e28;
text-decoration: none;
}
div.addu blockquote code.sourceCode { text-decoration: none; }
div.addu blockquote pre { text-decoration: none; }
div.addu blockquote pre code { text-decoration: none; }
div.quote {
border-left: 7px solid #ccc;
background: #f9f9f9;
margin: 1.5em 10px;
padding-left: 20px;
}
code.diff span.va { color: #000000; background-color: var(--diff-ins); }
code.diff span.st { color: #000000; background-color: var(--diff-del); }
div.std blockquote { color: #000000; background-color: #F1F1F1;
border: 1px solid #D1D1D1;
padding-left: 0.5em; padding-right: 0.5em; }
div.std.ins blockquote {
color: #000000; background-color: #C8FFC8;
border: 1px solid #B3EBB3;
}
div.ins > div.example {
color: #000000; background-color: #C8FFC8;
border: 1px solid #B3EBB3;
}
div.std div.sourceCode { background-color: inherit; margin-left: 1em; }
div.rm li {
text-decoration: line-through;
color: #000000;
}
div.std blockquote del, div.rm {
text-decoration: line-through;
color: #000000;
background-color: var(--diff-del);
border: none;
}
code del { border: 1px solid #ECB3C7; }
span.orange {
background-color: #ffa500;
}
span.yellow {
background-color: #ffff00;
}</style>
  <link href="data:image/x-icon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AIJEAACCRAAAgkQAAIJEAACCRAAAgkQAVoJEAN6CRADegkQAWIJEAACCRAAAgkQAAIJEAACCRAAA////AP///wCCRAAAgkQAAIJEAACCRAAsgkQAvoJEAP+CRAD/gkQA/4JEAP+CRADAgkQALoJEAACCRAAAgkQAAP///wD///8AgkQAAIJEABSCRACSgkQA/IJEAP99PQD/dzMA/3czAP99PQD/gkQA/4JEAPyCRACUgkQAFIJEAAD///8A////AHw+AFiBQwDqgkQA/4BBAP9/PxP/uZd6/9rJtf/bybX/upd7/39AFP+AQQD/gkQA/4FDAOqAQgBc////AP///wDKklv4jlEa/3o7AP+PWC//8+3o///////////////////////z7un/kFox/35AAP+GRwD/mVYA+v///wD///8A0Zpk+NmibP+0d0T/8evj///////+/fv/1sKz/9bCs//9/fr//////+/m2/+NRwL/nloA/5xYAPj///8A////ANKaZPjRmGH/5cKh////////////k149/3UwAP91MQD/lmQ//86rhv+USg3/m1YA/5hSAP+bVgD4////AP///wDSmmT4zpJY/+/bx///////8+TV/8mLT/+TVx//gkIA/5lVAP+VTAD/x6B//7aEVv/JpH7/s39J+P///wD///8A0ppk+M6SWP/u2sf///////Pj1f/Nj1T/2KFs/8mOUv+eWhD/lEsA/8aee/+0glT/x6F7/7J8Rvj///8A////ANKaZPjRmGH/48Cf///////+/v7/2qt//82PVP/OkFX/37KJ/86siv+USg7/mVQA/5hRAP+bVgD4////AP///wDSmmT40ppk/9CVXP/69O////////7+/v/x4M//8d/P//7+/f//////9u7n/6tnJf+XUgD/nFgA+P///wD///8A0ppk+NKaZP/RmWL/1qNy//r07///////////////////////+vXw/9akdP/Wnmn/y5FY/6JfFvj///8A////ANKaZFTSmmTo0ppk/9GYYv/Ql1//5cWm//Hg0P/x4ND/5cWm/9GXYP/RmGH/0ppk/9KaZOjVnmpY////AP///wDSmmQA0ppkEtKaZI7SmmT60ppk/9CWX//OkVb/zpFW/9CWX//SmmT/0ppk/NKaZJDSmmQS0ppkAP///wD///8A0ppkANKaZADSmmQA0ppkKtKaZLrSmmT/0ppk/9KaZP/SmmT/0ppkvNKaZCrSmmQA0ppkANKaZAD///8A////ANKaZADSmmQA0ppkANKaZADSmmQA0ppkUtKaZNzSmmTc0ppkVNKaZADSmmQA0ppkANKaZADSmmQA////AP5/AAD4HwAA4AcAAMADAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAMADAADgBwAA+B8AAP5/AAAoAAAAIAAAAEAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wCCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAAyCRACMgkQA6oJEAOqCRACQgkQAEIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAA////AP///wD///8A////AIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRABigkQA5oJEAP+CRAD/gkQA/4JEAP+CRADqgkQAZoJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAAD///8A////AP///wD///8AgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAA4gkQAwoJEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQAxIJEADyCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAAgkQAAP///wD///8A////AP///wCCRAAAgkQAAIJEAACCRAAAgkQAAIJEAACCRAAWgkQAmIJEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAJyCRAAYgkQAAIJEAACCRAAAgkQAAIJEAACCRAAA////AP///wD///8A////AIJEAACCRAAAgkQAAIJEAACCRAAAgkQAdIJEAPCCRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAP+CRAD/gkQA/4JEAPSCRAB4gkQAAIJEAACCRAAAgkQAAIJEAAD///8A////AP///wD///8AgkQAAIJEAACCRAAAgkQASoJEANKCRAD/gkQA/4JEAP+CRAD/g0YA/39AAP9zLgD/bSQA/2shAP9rIQD/bSQA/3MuAP9/PwD/g0YA/4JEAP+CRAD/gkQA/4JEAP+CRADUgkQAToJEAACCRAAAgkQAAP///wD///8A////AP///wB+PwAAgkUAIoJEAKiCRAD/gkQA/4JEAP+CRAD/hEcA/4BBAP9sIwD/dTAA/5RfKv+viF7/vp56/76ee/+wiF7/lWAr/3YxAP9sIwD/f0AA/4RHAP+CRAD/gkQA/4JEAP+CRAD/gkQArIJEACaBQwAA////AP///wD///8A////AIBCAEBzNAD6f0EA/4NFAP+CRAD/gkQA/4VIAP92MwD/bSUA/6N1Tv/ezsL/////////////////////////////////38/D/6V3Uv9uJgD/dTEA/4VJAP+CRAD/gkQA/4JEAP+BQwD/fUAA/4FDAEj///8A////AP///wD///8AzJRd5qBlKf91NgD/dDUA/4JEAP+FSQD/cy4A/3YyAP/PuKP//////////////////////////////////////////////////////9K7qP94NQD/ciwA/4VJAP+CRAD/fkEA/35BAP+LSwD/mlYA6v///wD///8A////AP///wDdpnL/4qx3/8KJUv+PUhf/cTMA/3AsAP90LgD/4dK+/////////////////////////////////////////////////////////////////+TYxf91MAD/dTIA/31CAP+GRwD/llQA/6FcAP+gWwD8////AP///wD///8A////ANGZY/LSm2X/4ap3/92mcP+wdT3/byQA/8mwj////////////////////////////////////////////////////////////////////////////+LYxv9zLgP/jUoA/59bAP+hXAD/nFgA/5xYAPL///8A////AP///wD///8A0ppk8tKaZP/RmWL/1p9q/9ubXv/XqXj////////////////////////////7+fD/vZyG/6BxS/+gcUr/vJuE//r37f//////////////////////3MOr/5dQBf+dVQD/nVkA/5xYAP+cWAD/nFgA8v///wD///8A////AP///wDSmmTy0ppk/9KaZP/SmWP/yohJ//jo2P//////////////////////4NTG/4JDFf9lGAD/bSQA/20kAP9kGAD/fz8S/+Xb0f//////5NG9/6txN/+LOgD/m1QA/51aAP+cWAD/m1cA/5xYAP+cWADy////AP///wD///8A////ANKaZPLSmmT/0ppk/8+TWf/Unmv//v37//////////////////////+TWRr/VwsA/35AAP+ERgD/g0UA/4JGAP9lHgD/kFga/8KXX/+TRwD/jT4A/49CAP+VTQD/n10A/5xYAP+OQQD/lk4A/55cAPL///8A////AP///wD///8A0ppk8tKaZP/SmmT/y4tO/92yiP//////////////////////8NnE/8eCQP+rcTT/ez0A/3IyAP98PgD/gEMA/5FSAP+USwD/jj8A/5lUAP+JNwD/yqV2/694Mf+HNQD/jkAA/82rf/+laBj/jT4A8v///wD///8A////AP///wDSmmTy0ppk/9KaZP/LiUr/4byY///////////////////////gupX/0I5P/+Wuev/Lklz/l1sj/308AP+QSwD/ol0A/59aAP+aVQD/k0oA/8yoh///////+fXv/6pwO//Lp3v///////Pr4f+oay7y////AP///wD///8A////ANKaZPLSmmT/0ppk/8uJSv/hvJj//////////////////////+G7l//Jhkb/0ppk/96nc//fqXX/x4xO/6dkFP+QSQD/llEA/5xXAP+USgD/yaOA///////38uv/qG05/8ijdv//////8efb/6ZpLPL///8A////AP///wD///8A0ppk8tKaZP/SmmT/zIxO/9yxh///////////////////////7dbA/8iEQf/Sm2X/0Zlj/9ScZv/eqHf/2KJv/7yAQf+XTgD/iToA/5lSAP+JNgD/yKFv/611LP+HNQD/jT8A/8qmeP+kZRT/jT4A8v///wD///8A////AP///wDSmmTy0ppk/9KaZP/Pk1n/1J5q//78+//////////////////+/fv/1aFv/8iEQv/Tm2b/0ppl/9GZY//Wn2z/1pZc/9eldf/Bl2b/kUcA/4w9AP+OQAD/lUwA/59eAP+cWQD/jT8A/5ZOAP+eXADy////AP///wD///8A////ANKaZPLSmmT/0ppk/9KZY//KiEn/8d/P///////////////////////47+f/05tm/8iCP//KiEj/yohJ/8eCP//RmGH//vfy///////n1sP/rXQ7/4k4AP+TTAD/nVoA/5xYAP+cVwD/nFgA/5xYAPL///8A////AP///wD///8A0ppk8tKaZP/SmmT/0ptl/8uLTf/aq37////////////////////////////+/fz/6c2y/961jv/etY7/6Myx//78+v//////////////////////3MWv/5xXD/+ORAD/mFQA/51ZAP+cWAD/nFgA8v///wD///8A////AP///wDSmmTy0ppk/9KaZP/SmmT/0ppk/8mFRP/s1b//////////////////////////////////////////////////////////////////////////////+PD/0JFU/7NzMv+WUQD/kUsA/5tXAP+dWQDy////AP///wD///8A////ANKaZP/SmmT/0ppk/9KaZP/Sm2X/z5NZ/8yMT//z5NX/////////////////////////////////////////////////////////////////9Ofa/8yNUP/UmGH/36p5/8yTWv+qaSD/kksA/5ROAPz///8A////AP///wD///8A0ppk5NKaZP/SmmT/0ppk/9KaZP/TnGf/zY9T/82OUv/t1sD//////////////////////////////////////////////////////+7Yw//OkFX/zI5R/9OcZ//SmmP/26V0/9ymdf/BhUf/ol8R6P///wD///8A////AP///wDSmmQ80ppk9tKaZP/SmmT/0ppk/9KaZP/TnGj/zpFW/8qJSv/dson/8uHS//////////////////////////////////Lj0//etIv/y4lL/86QVf/TnGj/0ppk/9KaZP/RmWP/05xn/9ymdfjUnWdC////AP///wD///8A////ANKaZADSmmQc0ppkotKaZP/SmmT/0ppk/9KaZP/Tm2b/0Zli/8qJSf/NjlH/16Z3/+G8mP/myKr/5siq/+G8mP/Xp3f/zY5S/8qISf/RmGH/05tm/9KaZP/SmmT/0ppk/9KaZP/SmmSm0pljINWdaQD///8A////AP///wD///8A0ppkANKaZADSmmQA0ppkQtKaZMrSmmT/0ppk/9KaZP/SmmT/0ptl/9GYYf/Nj1P/y4lL/8qISP/KiEj/y4lK/82PU//RmGH/0ptl/9KaZP/SmmT/0ppk/9KaZP/SmmTO0ppkRtKaZADSmmQA0ppkAP///wD///8A////AP///wDSmmQA0ppkANKaZADSmmQA0ppkANKaZGzSmmTu0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmTw0ppkcNKaZADSmmQA0ppkANKaZADSmmQA////AP///wD///8A////ANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZBLSmmSQ0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppklNKaZBTSmmQA0ppkANKaZADSmmQA0ppkANKaZAD///8A////AP///wD///8A0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQy0ppkutKaZP/SmmT/0ppk/9KaZP/SmmT/0ppk/9KaZP/SmmT/0ppkvtKaZDbSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkAP///wD///8A////AP///wDSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkXNKaZODSmmT/0ppk/9KaZP/SmmT/0ppk5NKaZGDSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA////AP///wD///8A////ANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkBtKaZIbSmmTo0ppk6tKaZIrSmmQK0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZADSmmQA0ppkANKaZAD///8A////AP/8P///+B///+AH//+AAf//AAD//AAAP/AAAA/gAAAHwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA+AAAAfwAAAP/AAAP/8AAP//gAH//+AH///4H////D//" rel="icon" />
  
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->
</head>
<body>
<div class="wrapper">
<header id="title-block-header">
<h1 class="title" style="text-align:center">Final Adjustments to C++26
Reflection</h1>
<table style="border:none;float:right">
  <tr>
    <td>Document #:</td>
    <td>P3687R1 <a href="https://wg21.link/P3687">[Latest]</a> <a href="https://wg21.link/P3687/status">[Status]</a></td>
  </tr>
  <tr>
    <td>Date:</td>
    <td>2025-06-18</td>
  </tr>
  <tr>
    <td style="vertical-align:top">Project:</td>
    <td>Programming Language C++</td>
  </tr>
  <tr>
    <td style="vertical-align:top">Audience:</td>
    <td>
      EWG, LEWG<br>
    </td>
  </tr>
  <tr>
    <td style="vertical-align:top">Reply-to:</td>
    <td>
      Wyatt Childers<br>&lt;<a href="mailto:wcc@edg.com" class="email">wcc@edg.com</a>&gt;<br>
      Dan Katz<br>&lt;<a href="mailto:dkatz85@bloomberg.net" class="email">dkatz85@bloomberg.net</a>&gt;<br>
      Daveed Vandevoorde<br>&lt;<a href="mailto:daveed@edg.com" class="email">daveed@edg.com</a>&gt;<br>
      Ville Voutilainen<br>&lt;<a href="mailto:ville.voutilainen@gmail.com" class="email">ville.voutilainen@gmail.com</a>&gt;<br>
    </td>
  </tr>
</table>
</header>
<div style="clear:both">
<div id="TOC" role="doc-toc">
<h1 id="toctitle">Contents</h1>
<ul>
<li><a href="#revision-history" id="toc-revision-history"><span class="toc-section-number">1</span> Revision
History<span></span></a></li>
<li><a href="#abstract" id="toc-abstract"><span class="toc-section-number">2</span> Abstract<span></span></a></li>
<li><a href="#background" id="toc-background"><span class="toc-section-number">3</span> Background<span></span></a>
<ul>
<li><a href="#removing-splice-template-arguments" id="toc-removing-splice-template-arguments"><span class="toc-section-number">3.1</span> Removing splice template
arguments<span></span></a>
<ul>
<li><a href="#refresher-what-are-splice-template-arguments" id="toc-refresher-what-are-splice-template-arguments"><span class="toc-section-number">3.1.1</span> Refresher: What are “splice
template arguments”?<span></span></a></li>
<li><a href="#would-removing-this-mean-that-i-cant-use-splices-as-template-arguments" id="toc-would-removing-this-mean-that-i-cant-use-splices-as-template-arguments"><span class="toc-section-number">3.1.2</span> Would removing this mean that I
can’t use splices as template arguments?<span></span></a></li>
<li><a href="#why-defer-to-c29" id="toc-why-defer-to-c29"><span class="toc-section-number">3.1.3</span> Why defer to
C++29?<span></span></a></li>
<li><a href="#what-power-is-lost-from-p2996" id="toc-what-power-is-lost-from-p2996"><span class="toc-section-number">3.1.4</span> What power is lost from
P2996?<span></span></a></li>
<li><a href="#can-we-add-this-later" id="toc-can-we-add-this-later"><span class="toc-section-number">3.1.5</span> Can we add this
later?<span></span></a></li>
<li><a href="#what-if-we-want-to-keep-it" id="toc-what-if-we-want-to-keep-it"><span class="toc-section-number">3.1.6</span> What if we want to keep
it?<span></span></a></li>
</ul></li>
<li><a href="#the-necessity-of-reflecting-using-declarations" id="toc-the-necessity-of-reflecting-using-declarations"><span class="toc-section-number">3.2</span> The necessity of reflecting
<code class="sourceCode cpp"><em>using-declaration</em></code>s<span></span></a>
<ul>
<li><a href="#motivation" id="toc-motivation"><span class="toc-section-number">3.2.1</span> Motivation<span></span></a></li>
<li><a href="#what-why" id="toc-what-why"><span class="toc-section-number">3.2.2</span> What?
Why?!<span></span></a></li>
<li><a href="#why-was-this-not-in-p2996r0-or-p2996r1-or-p2996r2-or" id="toc-why-was-this-not-in-p2996r0-or-p2996r1-or-p2996r2-or"><span class="toc-section-number">3.2.3</span> Why was this not in P2996R0 or
P2996R1 or P2996R2 or …?<span></span></a></li>
<li><a href="#how-should-this-be-handled" id="toc-how-should-this-be-handled"><span class="toc-section-number">3.2.4</span> How should this be
handled?<span></span></a></li>
<li><a href="#can-this-all-wait-until-c29" id="toc-can-this-all-wait-until-c29"><span class="toc-section-number">3.2.5</span> Can this all wait until
C++29?<span></span></a></li>
<li><a href="#what-else-can-we-do-with-entity-proxies" id="toc-what-else-can-we-do-with-entity-proxies"><span class="toc-section-number">3.2.6</span> What else can we do with entity
proxies?<span></span></a></li>
</ul></li>
</ul></li>
<li><a href="#implementation-experience" id="toc-implementation-experience"><span class="toc-section-number">4</span> Implementation
experience<span></span></a></li>
<li><a href="#suggested-polls" id="toc-suggested-polls"><span class="toc-section-number">5</span> Suggested polls<span></span></a>
<ul>
<li><a href="#remove-support-for-splice-template-arguments-from-d2996r13." id="toc-remove-support-for-splice-template-arguments-from-d2996r13.">1.
Remove support for
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
from D2996R13.<span></span></a></li>
<li><a href="#a.-add-reflection-of-entity-proxies-to-p2996-and-forward-to-cwg-for-inclusion-in-c26." id="toc-a.-add-reflection-of-entity-proxies-to-p2996-and-forward-to-cwg-for-inclusion-in-c26.">2a.
Add reflection of “entity proxies” to P2996 and forward to CWG for
inclusion in C++26.<span></span></a></li>
<li><a href="#b.-make-id-ill-formed-when-id-names-a-using-declaration-and-forward-to-cwg-for-inclusion-in-c26." id="toc-b.-make-id-ill-formed-when-id-names-a-using-declaration-and-forward-to-cwg-for-inclusion-in-c26.">2b.
Make <code class="sourceCode cpp"><span class="op">^^</span>id</code>
ill-formed when <code class="sourceCode cpp">id</code> names a
<code class="sourceCode cpp"><em>using-declaration</em></code> and
forward to CWG for inclusion in C++26.<span></span></a></li>
</ul></li>
<li><a href="#proposed-wording" id="toc-proposed-wording"><span class="toc-section-number">6</span> Proposed wording<span></span></a>
<ul>
<li><a href="#poll-1-remove-splice-template-arguments-from-p2996" id="toc-poll-1-remove-splice-template-arguments-from-p2996"><span class="toc-section-number">6.1</span> Poll 1: Remove
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
from P2996<span></span></a>
<ul>
<li><a href="#temp.param-template-parameters" id="toc-temp.param-template-parameters">[temp.param] Template
parameters<span></span></a></li>
<li><a href="#temp.names-names-of-template-specializations" id="toc-temp.names-names-of-template-specializations">[temp.names] Names
of template specializations<span></span></a></li>
<li><a href="#temp.arg.general-general" id="toc-temp.arg.general-general">[temp.arg.general]
General<span></span></a></li>
<li><a href="#temp.arg.type-template-type-arguments" id="toc-temp.arg.type-template-type-arguments">[temp.arg.type] Template
type arguments<span></span></a></li>
<li><a href="#temp.arg.template-template-template-arguments" id="toc-temp.arg.template-template-template-arguments">[temp.arg.template]
Template template arguments<span></span></a></li>
<li><a href="#temp.dep.temp-dependent-template-arguments" id="toc-temp.dep.temp-dependent-template-arguments">[temp.dep.temp]
Dependent template arguments<span></span></a></li>
</ul></li>
<li><a href="#poll-2a-augment-p2996-with-reflection-of-entity-proxies" id="toc-poll-2a-augment-p2996-with-reflection-of-entity-proxies"><span class="toc-section-number">6.2</span> Poll 2a: Augment P2996 with
reflection of entity proxies<span></span></a>
<ul>
<li><a href="#basic.pre-preamble" id="toc-basic.pre-preamble">[basic.pre] Preamble<span></span></a></li>
<li><a href="#basic.lookup-general" id="toc-basic.lookup-general">[basic.lookup]
General<span></span></a></li>
<li><a href="#class.qual-class-members" id="toc-class.qual-class-members">[class.qual] Class
members<span></span></a></li>
<li><a href="#basic.link-program-and-linkage" id="toc-basic.link-program-and-linkage">[basic.link] Program and
Linkage<span></span></a></li>
<li><a href="#basic.fundamental-fundamental-types" id="toc-basic.fundamental-fundamental-types">[basic.fundamental]
Fundamental types<span></span></a></li>
<li><a href="#expr.reflect-the-reflection-operator" id="toc-expr.reflect-the-reflection-operator">[expr.reflect] The
reflection operator<span></span></a></li>
<li><a href="#namespace.udecl-the-using-declaration" id="toc-namespace.udecl-the-using-declaration">[namespace.udecl] The
<code class="sourceCode cpp"><span class="kw">using</span></code>
declaration<span></span></a></li>
<li><a href="#module.interface-export-declaration" id="toc-module.interface-export-declaration">[module.interface] Export
declaration<span></span></a></li>
<li><a href="#class.mem.general-general" id="toc-class.mem.general-general">[class.mem.general]
General<span></span></a></li>
<li><a href="#class.copy.assign-copymove-assignment-operator" id="toc-class.copy.assign-copymove-assignment-operator">[class.copy.assign]
Copy/move assignment operator<span></span></a></li>
<li><a href="#class.access.general-general" id="toc-class.access.general-general">[class.access.general]
General<span></span></a></li>
<li><a href="#over.match.funcs.general-general" id="toc-over.match.funcs.general-general">[over.match.funcs.general]
General<span></span></a></li>
<li><a href="#temp.spec.partial.general-general" id="toc-temp.spec.partial.general-general">[temp.spec.partial.general]
General<span></span></a></li>
<li><a href="#meta.reflection.synop" id="toc-meta.reflection.synop">[meta.reflection.synop]<span></span></a></li>
<li><a href="#meta.reflection.operators-operator-representations" id="toc-meta.reflection.operators-operator-representations">[meta.reflection.operators]
Operator representations<span></span></a></li>
<li><a href="#meta.reflection.names" id="toc-meta.reflection.names">[meta.reflection.names]<span></span></a></li>
<li><a href="#meta.reflection.queries" id="toc-meta.reflection.queries">[meta.reflection.queries]<span></span></a></li>
<li><a href="#meta.reflection.member.queries-reflection-member-queries" id="toc-meta.reflection.member.queries-reflection-member-queries">[meta.reflection.member.queries]
Reflection member queries<span></span></a></li>
<li><a href="#meta.reflection.layout-reflection-layout-queries" id="toc-meta.reflection.layout-reflection-layout-queries">[meta.reflection.layout]
Reflection layout queries<span></span></a></li>
<li><a href="#meta.reflection.define.aggregate-reflection-class-definition-generation" id="toc-meta.reflection.define.aggregate-reflection-class-definition-generation">[meta.reflection.define.aggregate]
Reflection class definition generation<span></span></a></li>
</ul></li>
<li><a href="#poll-2b-make-usingdecl-ill-formed-for-using-declarators" id="toc-poll-2b-make-usingdecl-ill-formed-for-using-declarators"><span class="toc-section-number">6.3</span> Poll 2b: Make <code class="sourceCode cpp"><span class="op">^^</span>Using<span class="op">::</span>Decl</code>
ill-formed for
<code class="sourceCode cpp"><em>using-declarator</em></code>s<span></span></a>
<ul>
<li><a href="#expr.reflect-the-reflection-operator-1" id="toc-expr.reflect-the-reflection-operator-1">[expr.reflect] The
reflection operator<span></span></a></li>
</ul></li>
</ul></li>
<li><a href="#bibliography" id="toc-bibliography"><span class="toc-section-number">7</span> References<span></span></a></li>
</ul>
</div>
<h1 data-number="1" style="border-bottom:1px solid #cccccc" id="revision-history"><span class="header-section-number">1</span>
Revision History<a href="#revision-history" class="self-link"></a></h1>
<p>Since <span class="citation" data-cites="P3687R0">[<a href="https://wg21.link/p3687r0" role="doc-biblioref">P3687R0</a>]</span>:</p>
<ul>
<li>Added wording to make reflections of entity proxies TU-local
values.</li>
<li>Modified some verbs in [namespace.udecl] to “look through” chains of
entity proxies.</li>
<li>Fixed typos.</li>
</ul>
<h1 data-number="2" style="border-bottom:1px solid #cccccc" id="abstract"><span class="header-section-number">2</span> Abstract<a href="#abstract" class="self-link"></a></h1>
<p>We propose two minor design changes to <span class="citation" data-cites="P2996R12">[<a href="https://wg21.link/p2996r12" role="doc-biblioref">P2996R12</a>]</span> to ensure its readiness for
C++26 and future-proof the evolution of the feature.</p>
<p>First, we propose that “splice template arguments” be removed from
P2996 and deferred until C++29: Neither the wording nor the
implementation are fully baked, CWG has not (as of this writing)
dedicated sufficient time to its review, and Reflection suffers no loss
of expressive power from its removal.</p>
<p>Second, in response to edge cases surfaced during CWG review, we
elaborate on the need to represent
<code class="sourceCode cpp"><em>using-declaration</em></code>s with
Reflection. At this late stage, we offer two means of ameliorating this
feature’s absence:</p>
<ol type="1">
<li>Permit a narrow expansion of scope to what is already offered by
P2996 by introducing reflections of
<code class="sourceCode cpp"><em>using-declaration</em></code>s to
C++26, or</li>
<li>Make <code class="sourceCode cpp"><span class="op">^^</span>Cls<span class="op">::</span>mem</code>
ill-formed whenever <code class="sourceCode cpp">mem</code> names a
<code class="sourceCode cpp"><em>using-declaration</em></code>, thus
preserving the syntactic space for C++29.</li>
</ol>
<h1 data-number="3" style="border-bottom:1px solid #cccccc" id="background"><span class="header-section-number">3</span>
Background<a href="#background" class="self-link"></a></h1>
<h2 data-number="3.1" id="removing-splice-template-arguments"><span class="header-section-number">3.1</span> Removing splice template
arguments<a href="#removing-splice-template-arguments" class="self-link"></a></h2>
<h3 data-number="3.1.1" id="refresher-what-are-splice-template-arguments"><span class="header-section-number">3.1.1</span> Refresher: What are “splice
template arguments”?<a href="#refresher-what-are-splice-template-arguments" class="self-link"></a></h3>
<p>P2996 proposes
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
that can match any other kind of template argument. For instance,
given</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">class</span> P1, <span class="kw">auto</span> P2, <span class="kw">template</span><span class="op">&lt;</span><span class="kw">typename</span><span class="op">&gt;</span> <span class="kw">class</span> P3<span class="op">&gt;</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> mytemplate;</span></code></pre></div>
<p>the <code class="sourceCode cpp"><em>template-id</em></code></p>
<div class="sourceCode" id="cb2"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>mytemplate<span class="op">&lt;[:</span>R1<span class="op">:]</span>, <span class="op">[:</span>R2<span class="op">:]</span>, <span class="op">[:</span>R3<span class="op">:]&gt;</span></span></code></pre></div>
<p>will be valid as long as the constructs represented by
<code class="sourceCode cpp">R1</code>,
<code class="sourceCode cpp">R2</code>, and
<code class="sourceCode cpp">R3</code> match the form of the respective
template parameters.</p>
<h3 data-number="3.1.2" id="would-removing-this-mean-that-i-cant-use-splices-as-template-arguments"><span class="header-section-number">3.1.2</span> Would removing this mean that
I can’t use splices as template arguments?<a href="#would-removing-this-mean-that-i-cant-use-splices-as-template-arguments" class="self-link"></a></h3>
<p><strong>No</strong>. An expression splice (i.e.,
<code class="sourceCode cpp"><em>splice-expression</em></code>) can
appear as a constant template argument, and a type splice (i.e.,
<code class="sourceCode cpp"><em>splice-type-specifier</em></code>) can
appear as a type template argument.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <span class="kw">auto</span> r1 <span class="op">=</span> <span class="op">^^</span><span class="dt">int</span>;</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <span class="kw">auto</span> r2 <span class="op">=</span> std<span class="op">::</span>meta<span class="op">::</span>reflect_value<span class="op">(</span><span class="dv">42</span><span class="op">)</span>;</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>std<span class="op">::</span>array<span class="op">&lt;</span><span class="kw">typename</span> <span class="op">[:</span>r1<span class="op">:]</span>, <span class="op">[:</span>r2<span class="op">:]&gt;</span> arr;  <span class="co">// OK</span></span></code></pre></div>
<p><strong>Splice template arguments</strong>, the feature that we here
propose to remove from P2996, lets the syntax <code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]</span></code>
uniformly match any kind of template parameter when appearing in a
template argument list. So while the above example remains valid, the
following become disallowed because (in the absence of “splice template
argument” support) unqualified <code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]</span></code>
always parses as an expression:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>std<span class="op">::</span>array<span class="op">&lt;</span><span class="kw">typename</span> <span class="op">[:</span>r1<span class="op">:]</span>, <span class="op">[:</span>r2<span class="op">:]&gt;</span> arr1;</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>  <span class="co">// still OK</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>std<span class="op">::</span>array<span class="op">&lt;[:</span>r1<span class="op">:]</span>, <span class="op">[:</span>r2<span class="op">:]&gt;</span> arr2;</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>  <span class="co">// error: reflection of a type &#39;r1&#39; cannot splice as an expression; did you mean &#39;typename [:r1:]&#39;?</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a>  <span class="co">// error: cannot splice &#39;r1&#39; (a reflection of a type) as an expression</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>  <span class="co">// error: expression &#39;[:r1:]&#39; does not match template type parameter</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">typename</span> T, <span class="dt">int</span> V<span class="op">&gt;</span> <span class="kw">class</span> Tmp, <span class="kw">typename</span> T, <span class="dt">int</span> V<span class="op">&gt;</span></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> make<span class="op">()</span> <span class="op">{</span> <span class="cf">return</span> Tmp<span class="op">&lt;</span>T, V<span class="op">&gt;{}</span>; <span class="op">}</span></span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> std<span class="op">::</span>meta<span class="op">::</span>info rs<span class="op">[]</span> <span class="op">=</span> <span class="op">{^^</span>std<span class="op">::</span>array, <span class="op">^^</span><span class="dt">int</span>, std<span class="op">::</span>meta<span class="op">::</span>reflect_value<span class="op">(</span><span class="dv">42</span><span class="op">)}</span>;</span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> arr <span class="op">=</span> make<span class="op">&lt;[:</span>rs<span class="op">[</span><span class="dv">0</span><span class="op">]:]</span>, <span class="op">[:</span>rs<span class="op">[</span><span class="dv">1</span><span class="op">]:]</span>, <span class="op">[:</span>rs<span class="op">[</span><span class="dv">2</span><span class="op">]:]&gt;()</span>;</span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a>  <span class="co">// error: expression &#39;[:rs[0]:]&#39; does not match template template parameter &#39;Tmp&#39;</span></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a>  <span class="co">// error: expression &#39;[:rs[1]:]&#39; does not match type template parameter &#39;T&#39;</span></span></code></pre></div>
<h3 data-number="3.1.3" id="why-defer-to-c29"><span class="header-section-number">3.1.3</span> Why defer to C++29?<a href="#why-defer-to-c29" class="self-link"></a></h3>
<p>Consider the following example:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">typename</span><span class="op">&gt;</span> <span class="kw">class</span> TCls<span class="op">&gt;</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> tfn1<span class="op">()</span> <span class="op">{</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>  <span class="cf">return</span> TCls<span class="op">&lt;</span><span class="dt">int</span><span class="op">&gt;{}</span>;</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span>std<span class="op">::</span>meta<span class="op">::</span>info R<span class="op">&gt;</span></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> tfn2<span class="op">()</span> <span class="op">{</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a>  <span class="cf">return</span> tfn1<span class="op">&lt;[:</span>R<span class="op">:]&gt;()</span>;</span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>For the <code class="sourceCode cpp"><em>template-id</em></code>
<code class="sourceCode cpp">tfn1<span class="op">&lt;[:</span>R<span class="op">:]&gt;</span></code>
to be valid in the template definition of
<code class="sourceCode cpp">tfn2<span class="op">()</span></code>, we
must be able to substitute the dependent splice template argument <code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]</span></code>
into <code class="sourceCode cpp">tfn1</code>. In the parlance of P2996,
this entails replacing the
<code class="sourceCode cpp"><em>template-id</em></code> “<code class="sourceCode cpp">TCls<span class="op">&lt;</span><span class="dt">int</span><span class="op">&gt;</span></code>”
with the
<code class="sourceCode cpp"><em>splice-specialization-specifier</em></code>
“<code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]&lt;</span><span class="dt">int</span><span class="op">&gt;</span></code>”,
and replacing the
<code class="sourceCode cpp"><em>template-name</em></code>
“<code class="sourceCode cpp">TCls</code>” with the
<code class="sourceCode cpp"><em>splice-specifier</em></code> “<code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]</span></code>”.</p>
<p>Since Clang implements template substitution as a tree transformation
(i.e., “recursively substitute like things with like things”), the Clang
reference implementation of P2996 handles this by adding a new category
of <code class="sourceCode cpp">DependentTemplateName</code> in which a
<code class="sourceCode cpp">TemplateName</code> wraps a
<code class="sourceCode cpp">SpliceSpecifier</code>.</p>
<p>This implementation strategy mirrors the grammar proposed by <span class="citation" data-cites="P2996R7">[<a href="https://wg21.link/p2996r7" role="doc-biblioref">P2996R7</a>]</span>, in which a
<code class="sourceCode cpp"><em>template-name</em></code> might be a
<code class="sourceCode cpp"><em>splice-specifier</em></code>.
Discussion within CWG, however, steered us away from this direction (for
good reason: a
<code class="sourceCode cpp"><em>splice-specifier</em></code> is not a
“name”). The primary author of the Clang/P2996 reference implementation
has not identified a suitable alternative implementation strategy,
reinforcing the belief that splice template arguments, as currently
specified, <em>require</em> a tighter coupling of
<code class="sourceCode cpp"><em>template-name</em></code> and
<code class="sourceCode cpp"><em>splice-specifier</em></code>. As
tempting as it is to dismiss this as “just a wording problem”, the
wording strategy is not easily separable from the implementation
strategies that will be adopted by compilers.</p>
<p>Lastly, as of this writing, CWG is yet to invest meaningful time in
the review of
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s.
The combination of our belief that the wording is insufficient, together
with the scrutiny that the feature still requires, leaves us feeling
that dropping the feature from P2996 will strengthen P2996’s readiness
for C++26.</p>
<h3 data-number="3.1.4" id="what-power-is-lost-from-p2996"><span class="header-section-number">3.1.4</span> What power is lost from
P2996?<a href="#what-power-is-lost-from-p2996" class="self-link"></a></h3>
<p><strong>Absolutely none.</strong> Any
<code class="sourceCode cpp"><em>template-id</em></code> written with
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
as</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>template_name<span class="op">&lt;[:</span>R1<span class="op">:]</span>, <span class="op">[:</span>R2<span class="op">:]</span>, <span class="op">[:</span>Rs<span class="op">:]...&gt;</span></span></code></pre></div>
<p>can be equivalently expressed using <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>substitute</code>:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="op">[:</span>substitute<span class="op">(^^</span>template_name, <span class="op">{</span>R1, R2, Rs<span class="op">...}):]</span></span></code></pre></div>
<p>Splitting splice template arguments from the paper, therefore,
represents a means of reducing the P2996 surface area that CWG still
needs to review, while losing absolutely no expressive power from
P2996.</p>
<h3 data-number="3.1.5" id="can-we-add-this-later"><span class="header-section-number">3.1.5</span> Can we add this later?<a href="#can-we-add-this-later" class="self-link"></a></h3>
<p>Absolutely. For C++26, a template argument of the form <code class="sourceCode cpp"><span class="op">[:</span>R<span class="op">:]</span></code>
will always be considered a
<code class="sourceCode cpp"><em>splice-expression</em></code>, which
can only match a constant template parameter. In C++29, we can make it
well-formed for this syntax to also match type template parameters and
template template parameters.</p>
<p>That said, the change will not be entirely non-breaking; consider the
following example provided by Tomasz Kamiński:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">auto</span><span class="op">&gt;</span>     <span class="dt">int</span> foo<span class="op">()</span>;  <span class="co">// A</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">typename</span><span class="op">&gt;</span> <span class="dt">int</span> foo<span class="op">()</span>;  <span class="co">// B</span></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span>std<span class="op">::</span>meta<span class="op">::</span>info R<span class="op">&gt;</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> bar<span class="op">(</span><span class="dt">int</span><span class="op">)</span> <span class="op">-&gt;</span> <span class="kw">decltype</span><span class="op">(</span>foo<span class="op">&lt;[:</span>R<span class="op">:]&gt;())</span> <span class="op">{</span> <span class="cf">return</span> <span class="dv">1</span>; <span class="op">}</span>  <span class="co">// #1</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span>std<span class="op">::</span>meta<span class="op">::</span>info R<span class="op">&gt;</span></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> bar<span class="op">(...)</span> <span class="op">-&gt;</span> <span class="dt">int</span>                    <span class="op">{</span> <span class="cf">return</span> <span class="dv">0</span>; <span class="op">}</span>  <span class="co">// #2</span></span>
<span id="cb8-9"><a href="#cb8-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-10"><a href="#cb8-10" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <span class="dt">int</span> v <span class="op">=</span> bar<span class="op">&lt;^^</span><span class="dt">int</span><span class="op">&gt;(</span><span class="dv">1</span><span class="op">)</span>;</span></code></pre></div>
<p>In the initializer for <code class="sourceCode cpp">v</code>,
<code class="sourceCode cpp">bar</code> denotes an overload set
containing both #1 and #2. Function template argument deduction for #1
will fail, since the substitution of “<code class="sourceCode cpp"><span class="op">^^</span><span class="dt">int</span></code>”
into “<code class="sourceCode cpp">R</code>” will form “<code class="sourceCode cpp"><span class="op">[:^^</span><span class="dt">int</span><span class="op">:]</span></code>”
- an invalid
<code class="sourceCode cpp"><em>splice-expression</em></code>. Since
this ill-formed expression is within the immediate context, the
specialization will merely be discarded from the set of candidate
functions. We are left with the specialization derived from #2, within
which no such ill-formed expression appears;
<code class="sourceCode cpp">v</code> is initialized to
<code class="sourceCode cpp"><span class="dv">0</span></code>.</p>
<p>But in the presence of splice template arguments, “<code class="sourceCode cpp"><span class="op">[:^^</span><span class="dt">int</span><span class="op">:]</span></code>”
is parsed as a
<code class="sourceCode cpp"><em>splice-template-argument</em></code>
rather than an expression. The non-dependent
<code class="sourceCode cpp"><em>splice-template-argument</em></code> is
interpreted as a
<code class="sourceCode cpp"><em>splice-type-specifier</em></code>, so
the <code class="sourceCode cpp">B</code> overload is selected. Because
#1 is a better match than #2, <code class="sourceCode cpp">v</code>
would initialized to
<code class="sourceCode cpp"><span class="dv">1</span></code>.</p>
<p>WG21 has historically found changes to overload resolution to be
acceptable, even when it has meant breaking SFINAE-dependent programs.
We therefore feel that the suggestion to adopt splice template arguments
later rests on solid ground - but it’s certainly still worth pausing to
understand the implications.</p>
<h3 data-number="3.1.6" id="what-if-we-want-to-keep-it"><span class="header-section-number">3.1.6</span> What if we want to keep it?<a href="#what-if-we-want-to-keep-it" class="self-link"></a></h3>
<p>Risky, but also not the end of the world. The grammar for
<code class="sourceCode cpp"><em>template-name</em></code>
([temp.names]) will likely have to be extended:</p>
<div class="std">
<blockquote>
<div>
<div class="sourceCode" id="cb9"><pre class="sourceCode diff"><code class="sourceCode diff"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><em>template-name</em>:</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>    <em>identifier</em></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="va">+   <em>splice-specifier</em></span></span></code></pre></div>
</div>
</blockquote>
</div>
<p>Which is not only an invasive change, but one that CWG has judged to
be ill-advised. The P2996 authors will have to (again) comb through the
corpus of core wording to find what other sections must be modified to
account for the change, while adding various “if the
<code class="sourceCode cpp"><em>template-name</em></code> is an
<code class="sourceCode cpp"><em>identifier</em></code>” carve outs for
cases where the
<code class="sourceCode cpp"><em>template-name</em></code> is more
“name”-like than “computed entity specifier”-like. It is the opinion of
the authors that further substantial core wording homework would neither
be beneficial to the prospects of Reflection making C++26 nor to their
emotional well-being.</p>
<h2 data-number="3.2" id="the-necessity-of-reflecting-using-declarations"><span class="header-section-number">3.2</span> The necessity of reflecting
<code class="sourceCode cpp"><em>using-declaration</em></code>s<a href="#the-necessity-of-reflecting-using-declarations" class="self-link"></a></h2>
<h3 data-number="3.2.1" id="motivation"><span class="header-section-number">3.2.1</span> Motivation<a href="#motivation" class="self-link"></a></h3>
<p>Consider the following example:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Base <span class="op">{</span> <span class="dt">int</span> member <span class="op">=</span> <span class="dv">0</span>; <span class="op">}</span>;</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Derived <span class="op">:</span> <span class="kw">private</span> Base <span class="op">{</span> <span class="kw">using</span> Base<span class="op">::</span>member; <span class="op">}</span>;</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a>Derived d;</span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> p1 <span class="op">=</span> d<span class="op">.</span>member;  <span class="co">// OK</span></span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> p2 <span class="op">=</span> d<span class="op">.[:^^</span>Derived<span class="op">::</span>member<span class="op">:]</span>;   <span class="co">// error</span></span></code></pre></div>
<p>Consider also the following assertions, which all hold with <span class="citation" data-cites="P2996R12">[<a href="https://wg21.link/p2996r12" role="doc-biblioref">P2996R12</a>]</span>:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;meta&gt;</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Base <span class="op">{</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a>  <span class="kw">protected</span><span class="op">:</span> <span class="dt">int</span> member;</span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a>  <span class="kw">friend</span> <span class="dt">void</span> fn<span class="op">()</span>;</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a><span class="op">}</span>;</span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Derived <span class="op">:</span> <span class="kw">private</span> Base <span class="op">{</span></span>
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a>  <span class="kw">using</span> Base<span class="op">::</span>member;</span>
<span id="cb11-10"><a href="#cb11-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span>;</span>
<span id="cb11-11"><a href="#cb11-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-12"><a href="#cb11-12" aria-hidden="true" tabindex="-1"></a><span class="dt">void</span> fn<span class="op">()</span> <span class="op">{</span></span>
<span id="cb11-13"><a href="#cb11-13" aria-hidden="true" tabindex="-1"></a>  <span class="kw">constexpr</span> <span class="kw">auto</span> ctx <span class="op">=</span> std<span class="op">::</span>meta<span class="op">::</span>access_context<span class="op">::</span>unprivileged<span class="op">()</span>;</span>
<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a>  <span class="kw">static_assert</span><span class="op">(!</span>is_accessible<span class="op">(^^</span>Base<span class="op">::</span>member, ctx<span class="op">))</span>;</span>
<span id="cb11-15"><a href="#cb11-15" aria-hidden="true" tabindex="-1"></a>  <span class="kw">static_assert</span><span class="op">(!</span>is_accessible<span class="op">(^^</span>Derived<span class="op">::</span>member, ctx<span class="op">))</span>;</span>
<span id="cb11-16"><a href="#cb11-16" aria-hidden="true" tabindex="-1"></a>  <span class="kw">static_assert</span><span class="op">(!</span>is_accessible<span class="op">(^^</span>Base<span class="op">::</span>member, ctx<span class="op">.</span>via<span class="op">(^^</span>Derived<span class="op">)))</span>;</span>
<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a>  <span class="kw">static_assert</span><span class="op">(!</span>is_accessible<span class="op">(^^</span>Derived<span class="op">::</span>member, ctx<span class="op">.</span>via<span class="op">(^^</span>Derived<span class="op">)))</span>;</span>
<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb11-19"><a href="#cb11-19" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-20"><a href="#cb11-20" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> p <span class="op">=</span> <span class="op">&amp;</span>Derived<span class="op">::</span>member;  <span class="co">// no problem</span></span></code></pre></div>
<p>In particular, there is currently no way to observe</p>
<ol type="1">
<li>That the
<code class="sourceCode cpp"><em>using-declaration</em></code> naming
<code class="sourceCode cpp">Base<span class="op">::</span>member</code>
exists in the scope of <code class="sourceCode cpp">Derived</code>
or</li>
<li>That
<code class="sourceCode cpp">Base<span class="op">::</span>member</code>
can be accessibly named in the scope of
<code class="sourceCode cpp">Derived</code>.</li>
</ol>
<p>The first point implies restrictions for e.g., debug tools that may
wish to format a representation of a class type. The second implies a
limited view of which members are accessible within a class.</p>
<h3 data-number="3.2.2" id="what-why"><span class="header-section-number">3.2.2</span> What? Why?!<a href="#what-why" class="self-link"></a></h3>
<p>In both examples above, the expression <code class="sourceCode cpp"><span class="op">^^</span>Derived<span class="op">::</span>member</code>
represents the entity
<code class="sourceCode cpp">Base<span class="op">::</span>member</code>
because <code class="sourceCode cpp"><em>using-declaration</em></code>s
are transparently replaced with the declarations that they name during
lookup ([basic.lookup]/3). In the first example, the expression</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>d<span class="op">.[:^^</span>Derived<span class="op">::</span>member<span class="op">:]</span></span></code></pre></div>
<p>is ill-formed because the type of the left-hand-side (i.e., <code class="sourceCode cpp">Derived <span class="op">&amp;</span></code>)
cannot be converted to the “naming class” of the right-hand-side (i.e.,
<code class="sourceCode cpp">Base</code>) ([class.access.base]/6); since
<code class="sourceCode cpp"><span class="op">^^</span>Derived<span class="op">::</span>member</code>
represents
<code class="sourceCode cpp">Base<span class="op">::</span>member</code>,
this is the moral equivalent of writing <code class="sourceCode cpp">d<span class="op">.</span>Base<span class="op">::</span>member</code>.
Similarly in the second example, the expression</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>is_accessible<span class="op">(^^</span>Derived<span class="op">::</span>member, ctx<span class="op">.</span>via<span class="op">(^^</span>Derived<span class="op">))</span></span></code></pre></div>
<p>asks whether the class member
<code class="sourceCode cpp">Base<span class="op">::</span>member</code>
is accessible from a point in the global scope when named in the class
<code class="sourceCode cpp">Derived</code>. The algorithm from
[class.access.base]/5 tells us that this is not the case, which mirrors
the fact that writing <code class="sourceCode cpp">Derived<span class="op">::</span>Base<span class="op">::</span>member</code>
is ill-formed. If we want to instead determine whether <code class="sourceCode cpp">Derived<span class="op">::</span>member</code> is
well-formed, we must instead ask whether the
<code class="sourceCode cpp"><em>using-declaration</em></code> is
accessible in <code class="sourceCode cpp">Derived</code>, a question
which P2996 lacks the machinery to model.</p>
<h3 data-number="3.2.3" id="why-was-this-not-in-p2996r0-or-p2996r1-or-p2996r2-or"><span class="header-section-number">3.2.3</span> Why was this not in P2996R0
or P2996R1 or P2996R2 or …?<a href="#why-was-this-not-in-p2996r0-or-p2996r1-or-p2996r2-or" class="self-link"></a></h3>
<p>During early revisions of P2996, the authors did not seek to
integrate Reflection with Access Control. Around the time of the Wrocław
meeting, it became more clear that a robust story for observing the
accessibility of class members would be required to achieve consensus
for the design. The direction proposed by <span class="citation" data-cites="P3547R1">[<a href="https://wg21.link/p3547r1" role="doc-biblioref">P3547R1</a>]</span> received strong support in
Hagenberg, and was thereafter merged into <span class="citation" data-cites="P2996R10">[<a href="https://wg21.link/p2996r10" role="doc-biblioref">P2996R10</a>]</span>.</p>
<p><code class="sourceCode cpp"><em>using-declarator</em></code>s, as
currently specified, are not a natural target for Reflection: Since they
introduce only names (rather than entities or class members), there is
“nothing to reflect” (in this regard, they are more similar (pre-P2996)
to type aliases and namespace aliases than to e.g., non-static data
members). They nevertheless play an important role in Access Control: An
otherwise inaccessible member of a base class might be accessible when
named through a
<code class="sourceCode cpp"><em>using-declarator</em></code> declared
in a derived class (see [class.access.general]/4).</p>
<p>The surprising behavior exhibited by the first example, in which the
“surprising answer” is obtained using only the reflection and splicing
operators, was only very recently uncovered by a careful review of
[expr.ref] and [class.access] during CWG review.</p>
<h3 data-number="3.2.4" id="how-should-this-be-handled"><span class="header-section-number">3.2.4</span> How should this be handled?<a href="#how-should-this-be-handled" class="self-link"></a></h3>
<p>What follows is a small extension on top of what is proposed by
P2996. We provide it as an elaboration of how we believe Reflection
should interact with
<code class="sourceCode cpp"><em>using-declaration</em></code>s in an
unspecified future delivery vehicle of the C++ Standard.</p>
<ul>
<li><p>First, we propose modifying the core wording around
<code class="sourceCode cpp"><em>using-declarator</em></code>s such that
they <em>do</em> introduce entities (analogous to existing changes in
P2996 for type aliases and namespace aliases). In particular a
declaration</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> Cls <span class="op">{</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>  <span class="kw">using</span> Scope<span class="op">::</span>id;</span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span>;</span></code></pre></div>
<p>introduces a class (or namespace) member known as an <em>entity
proxy</em> for each entity (including inherited constructors and
arbitrary enumerators) whose declaration is named by
<code class="sourceCode cpp">Scope<span class="op">::</span>id</code>
(note: several such members may be introduced if
<code class="sourceCode cpp">Scope<span class="op">::</span>id</code>
denotes an overload set). The “underlying entity” of each such entity
proxy is one of the entities whose declarations were named by
<code class="sourceCode cpp">Scope<span class="op">::</span>id</code>.
Note that this is scarcely more than a technical wording change to make
sure there is “something to have a reflection of”.</p></li>
<li><p>Next, we propose that a
<code class="sourceCode cpp"><em>reflect-expression</em></code> <code class="sourceCode cpp"><span class="op">^^</span>Cls<span class="op">::</span>id</code>
whose operand names a unique entity proxy, <strong>represents said
entity proxy</strong>, and not its underlying entity. This gives a means
of observing the properties of the entity proxy (e.g., accessibility,
parent class) apart from the properties of its underlying
entity.</p></li>
<li><p>Since entity proxies (outside of functions) are members of
classes and namespaces, we propose that the reflections returned by
<code class="sourceCode cpp">members_of</code> also include entity
proxies (i.e., in formal P2996 parlance: entity proxies that are members
of a class or namespace <code class="sourceCode cpp">Q</code> are
<em><code class="sourceCode cpp">Q</code>-members-of-representable</em>).</p></li>
<li><p>If lookup for
<code class="sourceCode cpp">Cls<span class="op">::</span>id</code>
finds multiple declarations named <code class="sourceCode cpp">id</code>
in the scope of <code class="sourceCode cpp">Cls</code>, the
<code class="sourceCode cpp"><em>reflect-expression</em></code> <code class="sourceCode cpp"><span class="op">^^</span>Cls<span class="op">::</span>id</code>
is ambiguous and ill-formed, even if all such declarations denote the
same underlying entity.</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> A <span class="op">{</span> <span class="dt">void</span> fn<span class="op">()</span>; <span class="op">}</span>;</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> B <span class="op">:</span> <span class="kw">virtual</span> A <span class="op">{</span> <span class="kw">using</span> A<span class="op">::</span>fn; <span class="op">}</span>;</span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> C <span class="op">:</span> <span class="kw">virtual</span> A <span class="op">{</span> <span class="kw">using</span> A<span class="op">::</span>fn; <span class="op">}</span>;</span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> D <span class="op">:</span> B, C <span class="op">{}</span>;</span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="kw">auto</span> p <span class="op">=</span> <span class="op">&amp;</span>D<span class="op">::</span>fn;  <span class="co">// OK</span></span>
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <span class="kw">auto</span> r <span class="op">=</span> <span class="op">^^</span>D<span class="op">::</span>fn;  <span class="co">// ambiguous, ill-formed</span></span></code></pre></div>
<p>In a more distant future, it may be possible to let such expressions
represent <em>all</em> entities named by the ambiguous lookup; this
direction would take advantage of how Reflection separates the lookup of
a name from its point of use. Such “lookup sets” could be a powerful
extension that facilitates (and generalizes) overload sets.</p></li>
<li><p>Existing P2996 metafunctions would be updated to observe
properties of entity proxies (e.g.,
<code class="sourceCode cpp">is_public</code>,
<code class="sourceCode cpp">parent_of</code>,
<code class="sourceCode cpp">is_class_member</code>), and a new
<code class="sourceCode cpp">is_entity_proxy</code> function would be
introduced to recognize such reflections.</p></li>
<li><p>Lastly, the P2996 metafunction <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>dealias</code>
should map a reflection of an entity proxy to a reflection of its
underlying entity. Since the phrase “underlying entity” is a Word of
Power introduced by P2996 that applies equally well to aliases and
entity proxies, we propose renaming <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>dealias</code>
to <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>underlying_entity_of</code>.
A separate <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>proxied_entity_of</code>
function returns a reflection of the entity directly named by an entity
proxy without “unwrapping all layers” to reach the underlying
entity.</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> B <span class="op">{</span> <span class="kw">using</span> Alias <span class="op">=</span> <span class="dt">int</span>; <span class="op">}</span>;</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> D <span class="op">:</span> B <span class="op">{</span> <span class="kw">using</span> B<span class="op">::</span>Alias; <span class="op">}</span>;</span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span>is_type_alias<span class="op">(^^</span>B<span class="op">::</span>Alias<span class="op">))</span>;</span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span>is_entity_proxy<span class="op">(^^</span>D<span class="op">::</span>Alias<span class="op">))</span>;</span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(^^</span>B<span class="op">::</span>Alias <span class="op">!=</span> <span class="op">^^</span>D<span class="op">::</span>Alias<span class="op">)</span>;</span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span>proxied_entity_of<span class="op">(^^</span>D<span class="op">::</span>Alias<span class="op">)</span> <span class="op">==</span> <span class="op">^^</span>B<span class="op">::</span>Alias<span class="op">)</span>;</span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span>underlying_entity_of<span class="op">(^^</span>D<span class="op">::</span>Alias<span class="op">)</span> <span class="op">==</span> <span class="op">^^</span><span class="dt">int</span><span class="op">)</span>;</span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span>underlying_entity_of<span class="op">(^^</span>B<span class="op">::</span>Alias<span class="op">)</span> <span class="op">==</span> underlying_entity_of<span class="op">(^^</span>D<span class="op">::</span>Alias<span class="op">))</span>;</span></code></pre></div></li>
</ul>
<h3 data-number="3.2.5" id="can-this-all-wait-until-c29"><span class="header-section-number">3.2.5</span> Can this all wait until
C++29?<a href="#can-this-all-wait-until-c29" class="self-link"></a></h3>
<p>Given the following code:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> A <span class="op">{</span> <span class="kw">protected</span><span class="op">:</span> <span class="dt">int</span> m; <span class="op">}</span>;</span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> B <span class="op">:</span> <span class="kw">private</span> A <span class="op">{</span> <span class="kw">using</span> A<span class="op">::</span>m; <span class="op">}</span>;</span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <span class="kw">auto</span> rm <span class="op">=</span> <span class="op">^^</span>B<span class="op">::</span>m;</span></code></pre></div>
<p>We must decide now whether <code class="sourceCode cpp"><span class="op">^^</span>B<span class="op">::</span>m</code></p>
<ul>
<li>represents the member
<code class="sourceCode cpp">A<span class="op">::</span>m</code> that is
a member of <code class="sourceCode cpp">A</code> (<strong>P2996 status
quo</strong>),</li>
<li>represents a member
<code class="sourceCode cpp">B<span class="op">::</span>m</code> that is
a member of <code class="sourceCode cpp">B</code> and whose underlying
entity is
<code class="sourceCode cpp">A<span class="op">::</span>m</code> (as
elaborated above), or</li>
<li>is ill-formed.</li>
</ul>
<p>That decision will be observable to programs in several ways (e.g.,
whether <code class="sourceCode cpp">parent_of<span class="op">(</span>rm<span class="op">)</span></code>
is <code class="sourceCode cpp"><span class="op">^^</span>B</code> or
<code class="sourceCode cpp"><span class="op">^^</span>A</code>, the
result of <code class="sourceCode cpp">is_public<span class="op">(</span>rm<span class="op">)</span></code>,
etc). If we would prefer that <code class="sourceCode cpp"><span class="op">^^</span>B<span class="op">::</span>m</code>
instead represent a member of <code class="sourceCode cpp">B</code>, we
should either adopt that change now or make the expression ill-formed
entirely to reserve space for that change in C++29. Either way, we
should make that change for C++26.</p>
<h3 data-number="3.2.6" id="what-else-can-we-do-with-entity-proxies"><span class="header-section-number">3.2.6</span> What else can we do with
entity proxies?<a href="#what-else-can-we-do-with-entity-proxies" class="self-link"></a></h3>
<p>Although the “generative metaprogramming” facilities directly
provided by P2996 will be narrow (e.g.,
<code class="sourceCode cpp">define_aggregate</code>), it will be
possible to inspect the members and properties of a class, compute a
string containing a well-formed C++ class definition derived from that
class, render that string to <code class="sourceCode cpp">stdout</code>,
and write the resulting code to a file or a pipe to another process
(e.g., a C++ compiler). Such pipelines will benefit from being able to
inspect <code class="sourceCode cpp"><em>using-declarator</em></code>s,
as the transformed source code will more exactly correspond to the class
from which it was transformed.</p>
<p>As an aside, the proposed direction ought to make it possible to
implement a <code class="sourceCode cpp">class_lookup</code> library
function that accurately models the algorithm specified in
[class.member.lookup], which is pretty sweet. I’m sure we can think of
something fun to do with that.</p>
<h1 data-number="4" style="border-bottom:1px solid #cccccc" id="implementation-experience"><span class="header-section-number">4</span> Implementation experience<a href="#implementation-experience" class="self-link"></a></h1>
<p>Our proposal for “entity proxies” is entirely implemented in
Bloomberg’s Clang/P2996 fork. Passing either <code class="sourceCode cpp"><span class="op">-</span>fentity<span class="op">-</span>proxy<span class="op">-</span>reflection</code>
or <code class="sourceCode cpp"><span class="op">-</span>freflection<span class="op">-</span>latest</code>
(the latter being a “catch all” for all implemented reflection and
reflection-adjacent papers) enables the feature. An example on Godbolt
can be found <a href="https://godbolt.org/z/sYz8KaxWT">here</a>.</p>
<p>Splice template arguments are implemented in Clang/P2996, but the
effort to refactor and decouple their implementation from “template
names” motivated this proposal’s recommendation that they for now be
removed.</p>
<h1 data-number="5" style="border-bottom:1px solid #cccccc" id="suggested-polls"><span class="header-section-number">5</span>
Suggested polls<a href="#suggested-polls" class="self-link"></a></h1>
<p>The authors submit the following polls to EWG for their
consideration.</p>
<h3 class="unnumbered" id="remove-support-for-splice-template-arguments-from-d2996r13.">1.
Remove support for
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
from D2996R13.<a href="#remove-support-for-splice-template-arguments-from-d2996r13." class="self-link"></a></h3>
<h3>
<table>
<tr>
<td>
SF
</td>
<td>
F
</td>
<td>
N
</td>
<td>
A
</td>
<td>
SA
</td>
</tr>
<tr>
<td>
<br>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</h3>
<h3 class="unnumbered" id="a.-add-reflection-of-entity-proxies-to-p2996-and-forward-to-cwg-for-inclusion-in-c26.">2a.
Add reflection of “entity proxies” to P2996 and forward to CWG for
inclusion in C++26.<a href="#a.-add-reflection-of-entity-proxies-to-p2996-and-forward-to-cwg-for-inclusion-in-c26." class="self-link"></a></h3>
<h3>
<table>
<tr>
<td>
SF
</td>
<td>
F
</td>
<td>
N
</td>
<td>
A
</td>
<td>
SA
</td>
</tr>
<tr>
<td>
<br>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</h3>
<h3 class="unnumbered" id="b.-make-id-ill-formed-when-id-names-a-using-declaration-and-forward-to-cwg-for-inclusion-in-c26.">2b.
Make <code class="sourceCode cpp"><span class="op">^^</span>id</code>
ill-formed when <code class="sourceCode cpp">id</code> names a
<code class="sourceCode cpp"><em>using-declaration</em></code> and
forward to CWG for inclusion in C++26.<a href="#b.-make-id-ill-formed-when-id-names-a-using-declaration-and-forward-to-cwg-for-inclusion-in-c26." class="self-link"></a></h3>
<p><em>(Only suggested if [2a] does not find consensus)</em></p>
<h3>
<table>
<tr>
<td>
SF
</td>
<td>
F
</td>
<td>
N
</td>
<td>
A
</td>
<td>
SA
</td>
</tr>
<tr>
<td>
<br>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</h3>
<h1 data-number="6" style="border-bottom:1px solid #cccccc" id="proposed-wording"><span class="header-section-number">6</span>
Proposed wording<a href="#proposed-wording" class="self-link"></a></h1>
<h2 data-number="6.1" id="poll-1-remove-splice-template-arguments-from-p2996"><span class="header-section-number">6.1</span> Poll 1: Remove
<code class="sourceCode cpp"><em>splice-template-argument</em></code>s
from P2996<a href="#poll-1-remove-splice-template-arguments-from-p2996" class="self-link"></a></h2>
<p><span class="draftnote" style="color: #01796F">[ Drafting note: All
wording assumes D2996R13. ]</span></p>
<h3 class="unnumbered" id="temp.param-template-parameters">[temp.param]
Template parameters<a href="#temp.param-template-parameters" class="self-link"></a></h3>
<p>Strike the P2996 changes to the grammar at the beginning of
[temp.param]:</p>
<div class="std">
<blockquote>
<div>
<div class="sourceCode" id="cb18"><pre class="sourceCode diff"><code class="sourceCode diff"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>  <em>type-tt-parameter-default</em>:</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>      <em>nested-name-specifier</em><sub><em>opt</em></sub> <em>template-name</em></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a>      <em>nested-name-specifier</em> template <em>template-name</em></span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a><span class="st">-     <em>splice-template-argument</em></span></span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a>  <em>variable-tt-parameter</em>:</span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a>      <em>template-head</em> auto ...<sub><em>opt</em></sub> $identifier<sub><em>opt</em></sub></span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a>      <em>template-head</em> auto <em>identifier</em><sub><em>opt</em></sub> = <em>nested-name-specifier</em><sub><em>opt</em></sub> <em>template-name</em></span>
<span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a><span class="st">-     <em>template-head</em> auto <em>identifier</em><sub><em>opt</em></sub> = <em>splice-template-argument</em></span></span>
<span id="cb18-10"><a href="#cb18-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb18-11"><a href="#cb18-11" aria-hidden="true" tabindex="-1"></a>  <em>concept-tt-parameter</em>:</span>
<span id="cb18-12"><a href="#cb18-12" aria-hidden="true" tabindex="-1"></a>      template &lt; <em>template-parameter-list</em> &gt; concept ...<sub><em>opt</em></sub> <em>identifier</em><sub><em>opt</em></sub></span>
<span id="cb18-13"><a href="#cb18-13" aria-hidden="true" tabindex="-1"></a>      template &lt; <em>template-parameter-list</em> &gt; concept <em>identifier</em><sub><em>opt</em></sub> = <em>nested-name-specifier</em><sub><em>opt</em></sub> <em>template-name</em></span>
<span id="cb18-14"><a href="#cb18-14" aria-hidden="true" tabindex="-1"></a><span class="st">-     template &lt; <em>template-parameter-list</em> &gt; concept <em>identifier</em><sub><em>opt</em></sub> = <em>splice-template-argument</em></span></span></code></pre></div>
</div>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.names-names-of-template-specializations">[temp.names] Names of
template specializations<a href="#temp.names-names-of-template-specializations" class="self-link"></a></h3>
<p>Strike the P2996 changes to the grammar for
<code class="sourceCode cpp"><em>template-argument</em></code>:</p>
<div class="std">
<blockquote>
<div>
<div class="sourceCode" id="cb19"><pre class="sourceCode diff"><code class="sourceCode diff"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>  <em>template-argument</em>:</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>      <em>constant-expression</em></span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a>      <em>type-id</em></span>
<span id="cb19-4"><a href="#cb19-4" aria-hidden="true" tabindex="-1"></a>      <em>nested-name-specifier</em><sub><em>opt</em></sub> <em>template-name</em></span>
<span id="cb19-5"><a href="#cb19-5" aria-hidden="true" tabindex="-1"></a>      <em>nested-name-specifier</em><sub><em>opt</em></sub> template <em>template-name</em></span>
<span id="cb19-6"><a href="#cb19-6" aria-hidden="true" tabindex="-1"></a><span class="st">-     <em>splice-template-argument</em></span></span>
<span id="cb19-7"><a href="#cb19-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb19-8"><a href="#cb19-8" aria-hidden="true" tabindex="-1"></a><span class="st">- <em>splice-template-argument</em>:</span></span>
<span id="cb19-9"><a href="#cb19-9" aria-hidden="true" tabindex="-1"></a><span class="st">-     <em>splice-specifier</em></span></span></code></pre></div>
</div>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.arg.general-general">[temp.arg.general]
General<a href="#temp.arg.general-general" class="self-link"></a></h3>
<p>Strike the sentence from paragraph 1 pertaining to splice template
arguments from P2996:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_1" id="pnum_1">1</a></span>
The type and form of each
<code class="sourceCode cpp"><em>template-argument</em></code> specified
in a <code class="sourceCode cpp"><em>template-id</em></code> or in a
<code class="sourceCode cpp"><em>splice-specialization-specifier</em></code>
shall match the type and form specified for the corresponding parameter
declared by the template in its
<code class="sourceCode cpp"><em>template-parameter-list</em></code>.
<span class="rm" style="color: #bf0303"><del>A
<span><code class="sourceCode default"><em>template-argument</em></code></span>
that is a splice template argument is considered to match the form
specified for the corresponding template parameter.</del></span> When
the parameter declared by the template is a template parameter pack, it
will correspond to zero or more
<code class="sourceCode cpp"><em>template-argument</em></code>s.</p>
</blockquote>
</div>
<p>Revert the changes to paragraph 3 from P2996:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_2" id="pnum_2">3</a></span>
<span class="rm" style="color: #bf0303"><del>A
<span><code class="sourceCode default"><em>template-argument</em></code></span>
of the form
<span><code class="sourceCode default"><em>splice-specifier</em></code></span>
is interpreted as a
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span>.
For any other</del></span> <span class="addu">In a</span>
<code class="sourceCode cpp"><em>template-argument</em></code>, an
ambiguity between a <code class="sourceCode cpp"><em>type-id</em></code>
and an expression is resolved to a
<code class="sourceCode cpp"><em>type-id</em></code>, regardless of the
form of the corresponding
<code class="sourceCode cpp"><em>template-parameter</em></code>.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.arg.type-template-type-arguments">[temp.arg.type] Template type
arguments<a href="#temp.arg.type-template-type-arguments" class="self-link"></a></h3>
<p>Strike the changes to [temp.arg.type] from P2996:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_3" id="pnum_3">1</a></span>
A <code class="sourceCode cpp"><em>template-argument</em></code> for a
type template parameter shall <span class="rm" style="color: #bf0303"><del>either</del></span> be a
<code class="sourceCode cpp"><em>type-id</em></code> <span class="rm" style="color: #bf0303"><del>or a
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span>
whose
<span><code class="sourceCode default"><em>splice-specifier</em></code></span>
designates a type</del></span>.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.arg.template-template-template-arguments">[temp.arg.template]
Template template arguments<a href="#temp.arg.template-template-template-arguments" class="self-link"></a></h3>
<p>Strike the changes to [temp.arg.template] from P2996:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_4" id="pnum_4">1</a></span>
A <code class="sourceCode cpp"><em>template-argument</em></code> for a
template template parameter shall <span class="rm" style="color: #bf0303"><del>either</del></span> be the name of a
template <span class="rm" style="color: #bf0303"><del>or a
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span></del></span>.
For a <code class="sourceCode cpp"><em>type-tt-parameter</em></code>,
the name <span class="rm" style="color: #bf0303"><del>or
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span></del></span>
shall <span class="addu">denote</span> <span class="rm" style="color: #bf0303"><del>designate</del></span> a class template or
alias template. For a
<code class="sourceCode cpp"><em>variable-tt-parameter</em></code>, the
name <span class="rm" style="color: #bf0303"><del>or
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span></del></span>
shall <span class="addu">denote</span> <span class="rm" style="color: #bf0303"><del>designate</del></span> a variable template.
For a <code class="sourceCode cpp"><em>concept-tt-parameter</em></code>,
the name <span class="rm" style="color: #bf0303"><del>or
<span><code class="sourceCode default"><em>splice-template-argument</em></code></span></del></span>
shall <span class="addu">denote</span> <span class="rm" style="color: #bf0303"><del>designate</del></span> a concept. Only
primary templates are considered when matching the template argument
with the corresponding parameter; partial specializations are not
considered even if their parameter lists match that of the template
template parameter.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.dep.temp-dependent-template-arguments">[temp.dep.temp]
Dependent template arguments<a href="#temp.dep.temp-dependent-template-arguments" class="self-link"></a></h3>
<p>Strike the paragraph covering splice template arguments from
P2996.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_5" id="pnum_5">5</a></span>
A template
<code class="sourceCode cpp"><em>template-parameter</em></code> is
dependent if it names a
<code class="sourceCode cpp"><em>template-parameter</em></code> or if
its terminal name is dependent.</p>
<p><span class="rm" style="color: #bf0303"><del><span class="marginalizedparent"><a class="marginalized" href="#pnum_6" id="pnum_6">5+</a></span>
A splice template argument is dependent if its
<span><code class="sourceCode default"><em>splice-specifier</em></code></span>
is dependent.</del></span></p>
</blockquote>
</div>
<h2 data-number="6.2" id="poll-2a-augment-p2996-with-reflection-of-entity-proxies"><span class="header-section-number">6.2</span> Poll 2a: Augment P2996 with
reflection of entity proxies<a href="#poll-2a-augment-p2996-with-reflection-of-entity-proxies" class="self-link"></a></h2>
<div class="draftnote" style="color: #01796F">
<p>[ Drafting note: All wording assumes D2996R13.</p>
<p>The general approach starts from [namespace.udecl]: whereas a
<code class="sourceCode cpp"><em>using-declarator</em></code> previously
“named” or “nominated” or “referred” to a set of declarations, it is now
said to <em>proxy</em> those declarations. A
<code class="sourceCode cpp"><em>using-declarator</em></code> then
introduces an <em>entity proxy</em> for each entity introduced by one of
the declarations that it proxies. The
<code class="sourceCode cpp"><em>using-declarator</em></code> names the
entity proxies, but can still be said to “proxy” the found
declarations.</p>
<p>Entity proxies are entities; they can be class members, so
<code class="sourceCode cpp"><em>using-declaration</em></code>s now
introduce class members. The existing [class.access.base] definition for
when a “member is accessible when designated in a class from a point”
now works much more cleanly for
<code class="sourceCode cpp"><em>using-declaration</em></code>s.</p>
<p>Most other core wording changes are just preferring the verb
“proxies” to e.g., “names”. ]</p>
</div>
<h3 class="unnumbered" id="basic.pre-preamble">[basic.pre] Preamble<a href="#basic.pre-preamble" class="self-link"></a></h3>
<p>Add “entity proxies” to the list of entities in pargraph 8.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_7" id="pnum_7">8</a></span>
An <em>entity</em> is a variable, structured binding, result binding,
function, enumerator, type, type alias, non-static data member,
bit-field, template, namespace, namespace alias, <span class="addu">entity proxy</span>, template parameter, function
parameter, or <code class="sourceCode cpp"><em>init-capture</em></code>.
The <em>underlying entity</em> of an entity is that entity unless
otherwise specified. A name <em>denotes</em> the underlying entity of
the entity declared by each declaration that introduces the name.</p>
<p><span class="note"><span>[ <em>Note 1:</em> </span>Type aliases<span class="addu">,</span> <span class="rm" style="color: #bf0303"><del>and</del></span> namespace aliases<span class="addu">, and entity proxies</span> have underying entities that
are distinct from themselves.<span> — <em>end
note</em> ]</span></span></p>
</blockquote>
</div>
<h3 class="unnumbered" id="basic.lookup-general">[basic.lookup]
General<a href="#basic.lookup-general" class="self-link"></a></h3>
<p>Change “named” to “denoted” in paragraph 3.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_8" id="pnum_8">3</a></span>
A <em>single search</em> in a scope
<code class="sourceCode cpp"><em>S</em></code> for a name
<code class="sourceCode cpp"><em>N</em></code> from a program point
<code class="sourceCode cpp"><em>P</em></code> finds all declarations
that precede <code class="sourceCode cpp"><em>P</em></code> to which any
name that is the same as <code class="sourceCode cpp"><em>N</em></code>
([basic.pre]) is bound in
<code class="sourceCode cpp"><em>S</em></code>. If any such declaration
is a <code class="sourceCode cpp"><em>using-declarator</em></code> whose
terminal name ([expr.prim.id.unqual]) is not dependent
([temp.dep.type]), it is replaced by the declarations <span class="addu">denoted</span> <span class="rm" style="color: #bf0303"><del>named</del></span> by the
<code class="sourceCode cpp"><em>using-declarator</em></code>
([namespace.udecl]).</p>
</blockquote>
</div>
<h3 class="unnumbered" id="class.qual-class-members">[class.qual] Class
members<a href="#class.qual-class-members" class="self-link"></a></h3>
<p>Change “names” to “denotes” in paragraph 1.2:</p>
<div class="std">
<blockquote>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_9" id="pnum_9">(1.2)</a></span>
if <code class="sourceCode cpp"><em>N</em></code> is dependent and is
the terminal name of a
<code class="sourceCode cpp"><em>using-declarator</em></code>
([namespace.udecl]) that <span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">denotes</span> a constructor,</li>
</ul>
</blockquote>
</div>
<h3 class="unnumbered" id="basic.link-program-and-linkage">[basic.link]
Program and Linkage<a href="#basic.link-program-and-linkage" class="self-link"></a></h3>
<p>Add [namespace.udecl] to the note following paragraph 8:</p>
<div class="std">
<blockquote>
<p><span class="note3"><span>[ <em>Note 3:</em> </span>There are other
circumstances in which declarations declare the same entity (<span class="addu">[namespace.udecl],</span> [dcl.link], [temp.type],
[temp.spec.partial]).<span> — <em>end note</em> ]</span></span></p>
</blockquote>
</div>
<p>Extend p16.1+.2 to also include entity proxies:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_10" id="pnum_10">16</a></span>
A value or object is <em>TU-local</em> if</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_11" id="pnum_11">(16.0)</a></span>
it is of TU-local type,</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_12" id="pnum_12">(16.1)</a></span>
it is, or is a pointer to, a TU-local function or the object associated
with a TU-local variable,</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_13" id="pnum_13">(16.1+)</a></span>
it is a reflection representing either
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_14" id="pnum_14">(16.1+.1)</a></span>
an entity, value, or object that is TU-local, or</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_15" id="pnum_15">(16.1+.2)</a></span>
a type alias<span class="addu">,</span> <span class="rm" style="color: #bf0303"><del>or</del></span> a namespace alias, <span class="addu">or an entity proxy</span> or</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_16" id="pnum_16">(16.1+.3)</a></span>
a direct base class relationship ([class.derived.general]) for which the
base class or the derived class is TU-local, or</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_17" id="pnum_17">(16.1+.4)</a></span>
a data member description
(<code class="sourceCode cpp"><em>T</em></code>,
<code class="sourceCode cpp"><em>N</em></code>,
<code class="sourceCode cpp"><em>A</em></code>,
<code class="sourceCode cpp"><em>W</em></code>,
<code class="sourceCode cpp"><em>NUA</em></code>) ([class.mem.general])
for which <code class="sourceCode cpp"><em>T</em></code> is a type alias
or a TU-local type, or</li>
</ul></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_18" id="pnum_18">(16.2)</a></span>
it is an object of class or array type and any of its subobjects of the
objects or functions to which its non-static data members of reference
type refer is TU-local and is usable in constant expressions.</li>
</ul>
<p>Values that are TU-local to different translation units are never
considered equivalent.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="basic.fundamental-fundamental-types">[basic.fundamental] Fundamental
types<a href="#basic.fundamental-fundamental-types" class="self-link"></a></h3>
<p>Add a new bullet to the list of constructs that a reflection can
represent.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_19" id="pnum_19">16</a></span>
The types denoted by <code class="sourceCode cpp"><em>cv</em> std<span class="op">::</span>nullptr_t</code>
are distrinct types. […]</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_20" id="pnum_20">x</a></span>
A value of type <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>info</code>
is called a <em>reflection</em>. There exists a unique <em>null
reflection</em>; every other reflection is a representation of</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_21" id="pnum_21">(x.1)</a></span>
[…]</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_22" id="pnum_22">(x.16)</a></span>
a namespaace alias ([namespace.alias]),</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_23" id="pnum_23">(x.17)</a></span>
a namespace ([basic.namespace.general]),</li>
<li><span class="addu"><span class="marginalizedparent"><a class="marginalized" href="#pnum_24" id="pnum_24">(x.17+)</a></span>
an entity proxy ([namespace.udecl]),</span></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_25" id="pnum_25">(x.18)</a></span>
a direct base class relationship ([class.derived.general]), or</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_26" id="pnum_26">(x.19)</a></span>
a data member description ([class.mem.general]).</li>
</ul>
<p>A reflection is said to <em>represent</em> the corresponding
construct. […]</p>
</blockquote>
</div>
<h3 class="unnumbered" id="expr.reflect-the-reflection-operator">[expr.reflect] The reflection
operator<a href="#expr.reflect-the-reflection-operator" class="self-link"></a></h3>
<p>Extend paragraph 5 to allow a
<code class="sourceCode cpp"><em>reflect-expression</em></code> to
represent an entity proxy.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_27" id="pnum_27">5</a></span>
If a <code class="sourceCode cpp"><em>reflect-expression</em></code>
<code class="sourceCode cpp"><em>R</em></code> matches the form <code class="sourceCode cpp"><span class="op">^^</span> <em>qualified-reflection-name</em></code>,
it is interpreted as such and its representation is determined as
follows:</p>
<ul>
<li><span class="addu"><span class="marginalizedparent"><a class="marginalized" href="#pnum_28" id="pnum_28">(5.*)</a></span>
If the <code class="sourceCode cpp"><em>identifier</em></code> names a
unique entity proxy ([namespace.udecl]),
<code class="sourceCode cpp"><em>R</em></code> represents that entity
proxy. If the <code class="sourceCode cpp"><em>identifier</em></code>
names multiple entity proxies,
<code class="sourceCode cpp"><em>R</em></code> is
ill-formed.</span></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_29" id="pnum_29">(5.1)</a></span>
<span class="addu">Otherwise,</span> <span class="rm" style="color: #bf0303"><del>I</del></span><span class="addu">i</span>f
the <code class="sourceCode cpp"><em>identifier</em></code> is a
<code class="sourceCode cpp"><em>namespace-name</em></code> that names a
namespace alias ([namespace.alias]),
<code class="sourceCode cpp"><em>R</em></code> represents that namespace
alias. For any other
<code class="sourceCode cpp"><em>namespace-name</em></code>,
<code class="sourceCode cpp"><em>R</em></code> represents the denoted
namespace.</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_30" id="pnum_30">(5.2)</a></span>
[…]</li>
</ul>
</blockquote>
</div>
<h3 class="unnumbered" id="namespace.udecl-the-using-declaration">[namespace.udecl] The
<code class="sourceCode cpp"><span class="kw">using</span></code>
declaration<a href="#namespace.udecl-the-using-declaration" class="self-link"></a></h3>
<p>Modify paragraph 1 such that a
<code class="sourceCode cpp"><em>using-declarator</em></code> introduces
an entity called an “entity proxy”.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_31" id="pnum_31">1</a></span>
The component names of a
<code class="sourceCode cpp"><em>using-declarator</em></code> are those
of its
<code class="sourceCode cpp"><em>nested-name-specifier</em></code> and
<code class="sourceCode cpp"><em>unqualified-id</em></code>. Each
<code class="sourceCode cpp"><em>using-declarator</em></code> in a
<code class="sourceCode cpp"><em>using-declaration</em></code><sup>84</sup>
<span class="addu"><em>proxies</em></span> <span class="rm" style="color: #bf0303"><del>names</del></span> the set of declarations
found by lookup ([basic.lookup.qual]) for the
<code class="sourceCode cpp"><em>using-declarator</em></code>, except
the class and enumeration declarations that would be discarded are
merely ignored when checking for ambiguity ([basic.lookup]), conversion
function templates with a dependent return type are ignored, and certain
functions are hidden as described below. <span class="addu">Each
<code class="sourceCode cpp"><em>using-declarator</em></code> declares
an <em>entity proxy</em> corresponding to each unique entity introduced
by any of the declarations proxied by the
<code class="sourceCode cpp"><em>using-declarator</em></code>. An entity
proxy is said to <em>proxy</em> the entity
<code class="sourceCode cpp"><em>E</em></code> to which it corresponds,
and has the same underlying entity as
<code class="sourceCode cpp"><em>E</em></code>.</span> If the terminal
name of the
<code class="sourceCode cpp"><em>using-declarator</em></code> is
dependent ([temp.dep.type]), the
<code class="sourceCode cpp"><em>using-declarator</em></code> is
considered to <span class="rm" style="color: #bf0303"><del>name</del></span> <span class="addu">denote</span> a constructor if and only if the
<code class="sourceCode cpp"><em>nested-name-specifier</em></code> has a
terminal name that is the same as the
<code class="sourceCode cpp"><em>unqualified-id</em></code>. If the
lookup in any instantiation finds that a
<code class="sourceCode cpp"><em>using-declarator</em></code> that is
not considered to <span class="rm" style="color: #bf0303"><del>name</del></span> <span class="addu">denote</span> a constructor does do so, or that a
<code class="sourceCode cpp"><em>using-declarator</em></code> that is
considered to <span class="rm" style="color: #bf0303"><del>name</del></span> <span class="addu">denote</span> a constructor does not, the program is
ill-formed.</p>
<p><span class="addu">If a
<code class="sourceCode cpp"><em>using-declarator</em></code> introduces
an entity proxy <code class="sourceCode cpp"><em>P</em></code>, any
other <code class="sourceCode cpp"><em>using-declarator</em></code>
inhabiting the same scope that proxies a declaration of the entity
proxied by <code class="sourceCode cpp"><em>P</em></code> also declares
<code class="sourceCode cpp"><em>P</em></code>.</span></p>
</blockquote>
</div>
<p>Use “denotes” instead of “names” in paragraphs 2 and 3 to look
through other entity proxies.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_32" id="pnum_32">2</a></span>
If the <code class="sourceCode cpp"><em>using-declarator</em></code>
<span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">denotes</span> a constructor, it declares that the class
<em>inherits</em> the <span class="rm" style="color: #bf0303"><del>named</del></span> <span class="addu">denoted</span> set of <span class="addu">constructors</span> <span class="rm" style="color: #bf0303"><del>constructor declarations</del></span> from
the nominated base class.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_33" id="pnum_33">3</a></span>
In a <code class="sourceCode cpp"><em>using-declaration</em></code> used
as a <code class="sourceCode cpp"><em>member-declaration</em></code>,
each <code class="sourceCode cpp"><em>using-declarator</em></code> shall
either <span class="rm" style="color: #bf0303"><del>name</del></span>
<span class="addu">denote</span> an enumerator or have a
<code class="sourceCode cpp"><em>nested-name-specifier</em></code>
naming a base class of the current class ([expr.prim.this]).</p>
<p><span class="example1"><span>[ <em>Example 1:</em> </span>…<span>
— <em>end example</em> ]</span></span></p>
<p>If a <code class="sourceCode cpp"><em>using-declarator</em></code>
<span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">denotes</span> a constructor, its
<code class="sourceCode cpp"><em>nested-name-specifier</em></code> shall
name a direct base class of the current class. If the immediate (class)
scope is associated with a class template, it shall derive from the
specified base class or have at least one dependent base class.</p>
</blockquote>
</div>
<p>Modify paragraph 7 to implement the same rule in the presence of
entity proxies.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_34" id="pnum_34">7</a></span>
A <code class="sourceCode cpp"><em>using-declaration</em></code> that
<span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">proxies</span> a class member <span class="rm" style="color: #bf0303"><del>other than an enumerator</del></span> shall
<span class="addu">either</span> be a
<code class="sourceCode cpp"><em>member-declaration</em></code> <span class="addu">or denote an enumerator</span>.</p>
</blockquote>
</div>
<p>Use “denotes” instead of “names” in paragraphs 12-14 to look through
other entity proxies.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_35" id="pnum_35">12</a></span>
<span class="note5"><span>[ <em>Note 5:</em> </span>For the purpose of
forming a set of candidates during overload resolution, the functions
<span class="rm" style="color: #bf0303"><del>named</del></span> <span class="addu">denoted</span> by a
<code class="sourceCode cpp"><em>using-declaration</em></code> in a
derived class are treated as though they were direct members of the
derived class. […]<span> — <em>end note</em> ]</span></span></p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_36" id="pnum_36">13</a></span>
Constructors that are <span class="rm" style="color: #bf0303"><del>named</del></span> <span class="addu">denoted</span> by a
<code class="sourceCode cpp"><em>using-declaration</em></code> are
treated as though they were constructors of the derived class when
looking up constructors of the derived class ([class.qual]) or forming a
set of overload candidates ([over.match.ctor], [over.match.copy],
[over.match.list]).</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_37" id="pnum_37">14</a></span>
In a <code class="sourceCode cpp"><em>using-declarator</em></code> that
does not <span class="rm" style="color: #bf0303"><del>name</del></span>
<span class="addu">denote</span> a constructor, every declaration named
shall be accessible. In a
<code class="sourceCode cpp"><em>using-declarator</em></code> that <span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">denotes</span> a constructor, no access check is
performed.</p>
</blockquote>
</div>
<p>Strike paragraph 16:
<code class="sourceCode cpp"><em>using-declarator</em></code>s declare
members now and replace it with a note; fold the base-class constructor
provision into [class.access.general]/4.</p>
<div class="std">
<blockquote>
<p><span class="rm" style="color: #bf0303"><del><span class="marginalizedparent"><a class="marginalized" href="#pnum_38" id="pnum_38">16</a></span>
A
<span><code class="sourceCode default"><em>using-declaration</em></code></span>
has the usual accessibility for a
<span><code class="sourceCode default"><em>member-declaration</em></code></span>.
Base-class constructors considered because of a
<span><code class="sourceCode default"><em>using-declarator</em></code></span>
are accessible if they would be accessible when used to construct an
object of the base class; the accessibility of the
<span><code class="sourceCode default"><em>using-declaration</em></code></span>
is ignored.</del></span></p>
<p><span class="addu"><span class="note8"><span>[ <em>Note 8:</em>
</span>An entity proxy introduced by a
<code class="sourceCode cpp"><em>using-declaration</em></code> is
subject to the usual access rules unless its underlying entity is a
base-class constructor ([class.access.general]).<span> — <em>end
note</em> ]</span></span></span></p>
</blockquote>
</div>
<h3 class="unnumbered" id="module.interface-export-declaration">[module.interface] Export
declaration<a href="#module.interface-export-declaration" class="self-link"></a></h3>
<p>Adopt the language of “proxying” in paragraph 5.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_39" id="pnum_39">5</a></span>
If an exported declaration is a
<code class="sourceCode cpp"><em>using-declaration</em></code>
([namespace.udecl]) and is not within a header unit, <span class="addu">the underlying entity of each entity proxy thereby
introduced</span> <span class="rm" style="color: #bf0303"><del>to which
all of the
<span><code class="sourceCode default"><em>using-declarator</em></code></span>s
ultimately refer</del></span> (if any) shall have been introduced with a
name having external linkage.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="class.mem.general-general">[class.mem.general] General<a href="#class.mem.general-general" class="self-link"></a></h3>
<p>Remove <code class="sourceCode cpp"><em>using-declarator</em></code>s
from the list of declarations that do not introduce a class member in
paragraph 4.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_40" id="pnum_40">4</a></span>
A <code class="sourceCode cpp"><em>member-declaration</em></code> does
not declare new members of the class if it is</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_41" id="pnum_41">(4.1)</a></span>
a friend declaration ([class.friend]),</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_42" id="pnum_42">(4.2)</a></span>
a <code class="sourceCode cpp"><em>deduction-guide</em></code>
([temp.deduct.guide]),</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_43" id="pnum_43">(4.3)</a></span>
a <code class="sourceCode cpp"><em>template-declaration</em></code>
whose <code class="sourceCode cpp"><em>declaration</em></code> is one of
the above,</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_44" id="pnum_44">(4.4)</a></span>
a
<code class="sourceCode cpp"><em>static_assert-declaration</em></code>,
<span class="addu">or</span></li>
<li><span class="rm" style="color: #bf0303"><del><span class="marginalizedparent"><a class="marginalized" href="#pnum_45" id="pnum_45">(4.5)</a></span>
a
<span><code class="sourceCode default"><em>using-declaration</em></code></span>
([namespace.udecl]), or</del></span></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_46" id="pnum_46">(4.6)</a></span>
an <code class="sourceCode cpp"><em>empty-declaration</em></code>.</li>
</ul>
</blockquote>
</div>
<h3 class="unnumbered" id="class.copy.assign-copymove-assignment-operator">[class.copy.assign]
Copy/move assignment operator<a href="#class.copy.assign-copymove-assignment-operator" class="self-link"></a></h3>
<p>Use “denotes” in the note that follows paragraph 8.</p>
<div class="std">
<blockquote>
<p><span class="note5"><span>[ <em>Note 5:</em> </span>A
<code class="sourceCode cpp"><em>using-declaration</em></code> in a
derived class <code class="sourceCode cpp">C</code> that <span class="rm" style="color: #bf0303"><del>names</del></span> <span class="addu">denotes</span> an assignment operator from a base class
never suppressess the implicit declaration of an assignment operator of
<code class="sourceCode cpp">C</code>, even if the base class assignment
oeprator would be a copy or move assignmentoperator if declared as a
member of <code class="sourceCode cpp">C</code>.<span> — <em>end
note</em> ]</span></span></p>
</blockquote>
</div>
<h3 class="unnumbered" id="class.access.general-general">[class.access.general] General<a href="#class.access.general-general" class="self-link"></a></h3>
<p>Refer to the declarations “denoted” by
<code class="sourceCode cpp"><em>using-declarator</em></code>s, rather
than those “named” (i.e., the entity proxies), in paragraph 4. Also fold
the base-class accessibility provision from (now deleted)
[namespace.udecl]/16 into this paragraph.</p>
<div class="std">
<blockquote>
<p>Access control is applied uniformly to declarations and
expressions.</p>
<p><span class="note2"><span>[ <em>Note 2:</em> </span>Access control
applies to members nominated by friend declarations ([class.friend]) and
<code class="sourceCode cpp"><em>using-declaration</em></code>s
([namespace.udecl]).<span> — <em>end note</em> ]</span></span></p>
<p>When a <code class="sourceCode cpp"><em>using-declarator</em></code>
<span class="addu">that does not denote a base-class constructor</span>
is named, access control applies to <span class="addu">the entity
proxies nominated by</span> it, not to the <span class="addu">entities
whose</span> declarations <span class="addu">are denoted by</span> <span class="rm" style="color: #bf0303"><del>that replace</del></span> it.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="over.match.funcs.general-general">[over.match.funcs.general]
General<a href="#over.match.funcs.general-general" class="self-link"></a></h3>
<p>Change “nominated” to “denoted” in paragraph 4.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_47" id="pnum_47">4</a></span>
For implicit object member functions, the type of the implicit object
parameter is […].</p>
<p><span class="example1"><span>[ <em>Example 1:</em> </span>For a
<code class="sourceCode cpp"><span class="kw">const</span></code> member
function of class <code class="sourceCode cpp">X</code>, the extra
parameter is assumed to have type “lvalue reference to
<code class="sourceCode cpp"><span class="kw">const</span> X</code>”.<span>
— <em>end example</em> ]</span></span></p>
<p>For conversion functions that are implicit object member functions,
[…]. For non-conversion functions that are implicit object member
functions <span class="rm" style="color: #bf0303"><del>nominated</del></span> <span class="addu">denoted</span> by a
<code class="sourceCode cpp"><em>using-declaration</em></code> in a
derived class, the function is considered to be a member of the derived
class for the purpose of defining the type of the implicit object
parameter. For static member functions, […].</p>
</blockquote>
</div>
<h3 class="unnumbered" id="temp.spec.partial.general-general">[temp.spec.partial.general]
General<a href="#temp.spec.partial.general-general" class="self-link"></a></h3>
<p>Change “refers” to “denotes” in the note that follows paragraph
7.</p>
<div class="std">
<blockquote>
<p><span class="note1"><span>[ <em>Note 1:</em> </span>One consequence
is that a <code class="sourceCode cpp"><em>using-declaration</em></code>
which <span class="rm" style="color: #bf0303"><del>refers
to</del></span> <span class="addu">denotes</span> a class template does
not restrict the set of partial specializations that are found through
the
<code class="sourceCode cpp"><em>using-declaration</em></code>.<span>
— <em>end note</em> ]</span></span></p>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.synop">[meta.reflection.synop]<a href="#meta.reflection.synop" class="self-link"></a></h3>
<p>Add the <code class="sourceCode cpp">is_entity_proxy</code> and
<code class="sourceCode cpp">proxied_entity_of</code> functions.</p>
<div class="std">
<blockquote>
<p><strong>Header <code class="sourceCode cpp"><span class="op">&lt;</span>meta<span class="op">&gt;</span></code>
synopsis</strong></p>
<div class="sourceCode" id="cb20"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;initializer_list&gt;</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a><span class="kw">namespace</span> std<span class="op">::</span>meta <span class="op">{</span></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a>  <span class="op">[...]</span></span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_enumerable_type<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-7"><a href="#cb20-7" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_variable<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-8"><a href="#cb20-8" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_type<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-9"><a href="#cb20-9" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_namespace<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-10"><a href="#cb20-10" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_type_alias<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-11"><a href="#cb20-11" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_namespace_alias<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-12"><a href="#cb20-12" aria-hidden="true" tabindex="-1"></a>  <span class="addu"><code class="sourceCode cpp"><span class="kw">consteval</span> <span class="dt">bool</span> is_entity_proxy<span class="op">(</span>info r<span class="op">)</span>;</code></span></span>
<span id="cb20-13"><a href="#cb20-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-14"><a href="#cb20-14" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> is_function<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-15"><a href="#cb20-15" aria-hidden="true" tabindex="-1"></a>  <span class="op">[...]</span></span>
<span id="cb20-16"><a href="#cb20-16" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> has_default_member_initializer<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-17"><a href="#cb20-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-18"><a href="#cb20-18" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> <span class="dt">bool</span> has_parent<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-19"><a href="#cb20-19" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> info parent_of<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-20"><a href="#cb20-20" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-21"><a href="#cb20-21" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span> info <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-22"><a href="#cb20-22" aria-hidden="true" tabindex="-1"></a>  <span class="addu"><code class="sourceCode cpp"><span class="kw">consteval</span> info proxied_entity_of<span class="op">(</span>info r<span class="op">)</span>;</code></span></span>
<span id="cb20-23"><a href="#cb20-23" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-24"><a href="#cb20-24" aria-hidden="true" tabindex="-1"></a>  <span class="kw">consteval</span>  <span class="dt">bool</span> has_template_arguments<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb20-25"><a href="#cb20-25" aria-hidden="true" tabindex="-1"></a>  <span class="op">[...]</span></span>
<span id="cb20-26"><a href="#cb20-26" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
</blockquote>
</div>
<p>Change <code class="sourceCode cpp">dealias</code> to
<code class="sourceCode cpp">underlying_entity_of</code> in the second
note that follows paragraph 2.</p>
<div class="std">
<blockquote>
<p><span class="note2"><span>[ <em>Note 2:</em> </span>The behavior of
many of the functions specified in namespace
<code class="sourceCode cpp">std<span class="op">::</span>meta</code>
have semantics that can be affected by the completness of class types
represented by reflection values. For such functions, for any reflection
<code class="sourceCode cpp">r</code> such that <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
represents a specialization of a templated class with a reachable
definition, the specialization is implicitly instantiated
([temp.inst]).<span> — <em>end note</em> ]</span></span></p>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.operators-operator-representations">[meta.reflection.operators]
Operator representations<a href="#meta.reflection.operators-operator-representations" class="self-link"></a></h3>
<p>Modify <code class="sourceCode cpp">operator_of</code> to account for
entity proxies:</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb21"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> operators operator_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_48" id="pnum_48">2</a></span>
<em>Constant When</em>: <span class="addu"><code class="sourceCode cpp">underlying_entity_of<span class="op">(</span></code></span><code class="sourceCode cpp">r</code><span class="addu"><code class="sourceCode cpp"><span class="op">)</span></code></span>
represents an operator function or operator function template.</p>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.names">[meta.reflection.names]<a href="#meta.reflection.names" class="self-link"></a></h3>
<p>Modify <code class="sourceCode cpp">has_identifier</code> to account
for entity proxies:</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb22"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> has_identifier<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_49" id="pnum_49">1</a></span>
<em>Returns</em>:</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_50" id="pnum_50">(1.1)</a></span>
[…]</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_51" id="pnum_51">(1.9)</a></span>
Otherwise, if <code class="sourceCode cpp">r</code> represents an
enumerator, non-static data member, namespace, <span class="rm" style="color: #bf0303"><del>or</del></span> namespace alias, <span class="addu">or entity proxy,</span> then
<code class="sourceCode cpp"><span class="kw">true</span></code>.</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_52" id="pnum_52">(1.10)</a></span>
Otherwise, […]</li>
</ul>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.queries">[meta.reflection.queries]<a href="#meta.reflection.queries" class="self-link"></a></h3>
<div class="draftnote" style="color: #01796F">
<p>[ Drafting note: For several metafunctions, we do not want entity
proxies to “act like” their underlying entity (e.g.,
<code class="sourceCode cpp">members_of</code> should not enumerate the
members of the underlying entity of an entity proxy). For that reason,
<code class="sourceCode cpp">underlying_entity_of<span class="op">(</span>r<span class="op">)</span></code>
is too blunt of a tool for specifying such functions.</p>
<p>We instead introduce an exposition-only
<code class="sourceCode cpp"><em>DEALIAS</em></code> function, which
maps reflections of entity proxies to the null reflection. This causes
entity proxies to fail the preconditions for functions that should not
apply to them, yielding a useful wrapper around
<code class="sourceCode cpp">underlying_entity_of</code> for purposes of
specification.</p>
<p>Other than adding new functions and renaming
<code class="sourceCode cpp">dealias</code> to
<code class="sourceCode cpp">underlying_entity_of</code>, the only other
noteworthy change is that <code class="sourceCode cpp">members_of</code>
also returns entity proxies. ]</p>
</div>
<p>Introduce a metasyntactic function following
<code class="sourceCode cpp"><em>has-type</em></code> to “unwrap” a
reflection to its underlying entity, while excluding entity proxies.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb23"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> <em>has-type</em><span class="op">(</span>info r<span class="op">)</span>; <span class="co">// exposition only</span></span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_53" id="pnum_53">1</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<code class="sourceCode cpp">r</code> represents a value, object,
variable, function that is not a constructor or destructor, enumerator,
non-static data member, unnamed-bit-field, direct base class
relationship, or data member description. Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
<div class="addu">
<div class="sourceCode" id="cb24"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> info <em>DEALIAS</em><span class="op">(</span>info r<span class="op">)</span>; <span class="co">// exposition only</span></span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_54" id="pnum_54">*</a></span>
<em>Returns</em>: <code class="sourceCode cpp">underlying_entity_of<span class="op">(</span>r<span class="op">)</span></code>
if <code class="sourceCode cpp">r</code> represents an entity that is
not an entity proxy. Otherwise, the null reflection.</p>
</div>
</blockquote>
</div>
<p>Disallow entity proxies from being used with
<code class="sourceCode cpp">value_of</code>.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb25"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> info value_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_55" id="pnum_55">7</a></span>
Let <code class="sourceCode cpp"><em>R</em></code> be a constant
expression of type <code class="sourceCode cpp">info</code> such that
<code class="sourceCode cpp"><em>R</em> <span class="op">==</span></code>
<span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em><span class="op">(</span></code></span><code class="sourceCode cpp">r</code><span class="addu"><code class="sourceCode cpp"><span class="op">)</span></code></span>
is <code class="sourceCode cpp"><span class="kw">true</span></code>.</p>
</blockquote>
</div>
<p>Specify <code class="sourceCode cpp">is_const</code> and
<code class="sourceCode cpp">is_volatile</code> in terms of
<code class="sourceCode cpp"><em>DEALIAS</em></code>.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb26"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_const<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_volatile<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_56" id="pnum_56">19</a></span>
Let <code class="sourceCode cpp"><em>T</em></code> be <code class="sourceCode cpp">type_of<span class="op">(</span>r<span class="op">)</span></code>
if <code class="sourceCode cpp"><em>has-type</em><span class="op">(</span>r<span class="op">)</span></code>
is <code class="sourceCode cpp"><span class="kw">true</span></code>.
Otherwise, let <code class="sourceCode cpp"><em>T</em></code> be <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>.</p>
</blockquote>
</div>
<p>Also specify
<code class="sourceCode cpp">is_lvalue_reference_qualified</code> and
<code class="sourceCode cpp">is_rvalue_reference_qualified</code> in
terms of <code class="sourceCode cpp"><em>DEALIAS</em></code>.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb27"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_lvalue_reference_qualified<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_rvalue_reference_qualified<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_57" id="pnum_57">22</a></span>
Let <code class="sourceCode cpp"><em>T</em></code> be <code class="sourceCode cpp">type_of<span class="op">(</span>r<span class="op">)</span></code>
if <code class="sourceCode cpp"><em>has-type</em><span class="op">(</span>r<span class="op">)</span></code>
is <code class="sourceCode cpp"><span class="kw">true</span></code>.
Otherwise, let <code class="sourceCode cpp"><em>T</em></code> be <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>.</p>
</blockquote>
</div>
<p>Change <code class="sourceCode cpp">dealias</code> to
<code class="sourceCode cpp"><em>DEALIAS</em></code> for
<code class="sourceCode cpp">is_complete_type</code>:</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_58" id="pnum_58">26</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<code class="sourceCode cpp">is_type<span class="op">(</span>r<span class="op">)</span></code>
is <code class="sourceCode cpp"><span class="kw">true</span></code> and
there is some point in the evaluation context from which the type
represented by <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
is not an incomplete type ([basic.types]). Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
</blockquote>
</div>
<p>Account for entity proxies in the specification of
<code class="sourceCode cpp">is_enumerable_type</code>.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb28"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_enumerable_type<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_59" id="pnum_59">27</a></span>
A type <code class="sourceCode cpp"><em>T</em></code> is
<em>enumerable</em> from a point
<code class="sourceCode cpp"><em>P</em></code> if either […]</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_60" id="pnum_60">28</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
represents a type that is enumerable from some point in the evaluation
context. Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
</blockquote>
</div>
<p>Use <code class="sourceCode cpp"><em>DEALIAS</em></code> in
<code class="sourceCode cpp">is_type</code> and
<code class="sourceCode cpp">is_namespace</code>. Specify the behavior
of <code class="sourceCode cpp">is_entity_proxy</code> following the
specification of
<code class="sourceCode cpp">is_namespace_alias</code>:</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb29"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_type<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb29-2"><a href="#cb29-2" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_namespace<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_61" id="pnum_61">30</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
represents a type or namespace, respectively. Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_type_alias<span class="op">(</span>info r<span class="op">)</span>;</span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_namespace_alias<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_62" id="pnum_62">31</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<code class="sourceCode cpp">r</code> represents a type alias or a
namespace alias, respectively <span class="note4"><span>[ <em>Note
4:</em> </span>A specialization of an alias template is a type
alias<span> — <em>end note</em> ]</span></span>. Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
<div class="addu">
<div class="sourceCode" id="cb31"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">bool</span> is_entity_proxy<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_63" id="pnum_63">31+</a></span>
<em>Returns</em>:
<code class="sourceCode cpp"><span class="kw">true</span></code> if
<code class="sourceCode cpp">r</code> represents an entity proxy.
Otherwise,
<code class="sourceCode cpp"><span class="kw">false</span></code>.</p>
</div>
</blockquote>
</div>
<p>Change <code class="sourceCode cpp">dealias</code> to
<code class="sourceCode cpp">underlying_entity_of</code> and add
<code class="sourceCode cpp">proxied_entity_of</code> following the
specification of
<code class="sourceCode cpp">underlying_entity_of</code>:</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb32"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> info <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_64" id="pnum_64">45</a></span>
<em>Constant When</em>: <code class="sourceCode cpp">r</code> represents
an entity.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_65" id="pnum_65">46</a></span>
<em>Returns</em>: A reflection representing the underlying entity of
what <code class="sourceCode cpp">r</code> represents.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_66" id="pnum_66">47</a></span></p>
<div class="example">
<span>[ <em>Example 1:</em> </span>
<div class="sourceCode" id="cb33"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> X <span class="op">=</span> <span class="dt">int</span>;</span>
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Y <span class="op">=</span> X;</span>
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span><span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><span class="op">(^^</span><span class="dt">int</span><span class="op">)</span> <span class="op">==</span> <span class="op">^^</span><span class="dt">int</span><span class="op">)</span>;</span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span><span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><span class="op">(^^</span>X<span class="op">)</span> <span class="op">==</span> <span class="op">^^</span><span class="dt">int</span><span class="op">)</span>;</span>
<span id="cb33-5"><a href="#cb33-5" aria-hidden="true" tabindex="-1"></a><span class="kw">static_assert</span><span class="op">(</span><span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp">underlying_entity_of</code></span><span class="op">(^^</span>Y<span class="op">)</span> <span class="op">==</span> <span class="op">^^</span><span class="dt">int</span><span class="op">)</span>;</span></code></pre></div>
<span> — <em>end example</em> ]</span>
</div>
<div class="addu">
<div class="sourceCode" id="cb34"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> info proxied_entity_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_67" id="pnum_67">*</a></span>
<em>Constant When</em>: <code class="sourceCode cpp">r</code> represents
an entity proxy.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_68" id="pnum_68">*</a></span>
<em>Returns</em>: A reflection representing the entity proxied by the
entity proxy represented by <code class="sourceCode cpp">r</code>.</p>
</div>
</blockquote>
</div>
<p>:::</p>
<h3 class="unnumbered" id="meta.reflection.member.queries-reflection-member-queries">[meta.reflection.member.queries]
Reflection member queries<a href="#meta.reflection.member.queries-reflection-member-queries" class="self-link"></a></h3>
<p>Specify in terms of
<code class="sourceCode cpp"><em>DEALIAS</em></code> to disallow entity
proxies from several functions. Make entity proxies
<code class="sourceCode cpp"><em>Q</em></code>-members-of-representable.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb35"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> vector<span class="op">&lt;</span>info<span class="op">&gt;</span> members_of<span class="op">(</span>info r, access_context ctx<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_69" id="pnum_69">1</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
is a reflection representing either a class type that is complete from
some point in the evaluation context or a namespace.</p>
<p>[…]</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_70" id="pnum_70">4</a></span>
A member <code class="sourceCode cpp"><em>M</em></code> of a class or
namespace <code class="sourceCode cpp"><em>Q</em></code> is
<em><code class="sourceCode cpp"><em>Q</em></code>-members-of-representable</em>
from a point <code class="sourceCode cpp"><em>P</em></code> if a
<code class="sourceCode cpp"><em>Q</em></code>-members-of-eligible
declaration of <code class="sourceCode cpp"><em>M</em></code>
members-of-precedes <code class="sourceCode cpp"><em>P</em></code> and
<code class="sourceCode cpp"><em>M</em></code> is</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_71" id="pnum_71">(4.1)</a></span>
a class or enumeration type,</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_72" id="pnum_72">(4.2)</a></span>
[…]</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_73" id="pnum_73">(4.10)</a></span>
a namespace, <span class="rm" style="color: #bf0303"><del>or</del></span></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_74" id="pnum_74">(4.11)</a></span>
a namespace alias<span class="addu">, or</span></li>
<li><span class="addu"><span class="marginalizedparent"><a class="marginalized" href="#pnum_75" id="pnum_75">(4.12)</a></span>
an entity proxy</span>.</li>
</ul>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_76" id="pnum_76">5</a></span>
<em>Returns</em>: […]</p>
<div class="sourceCode" id="cb36"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> vector<span class="op">&lt;</span>info<span class="op">&gt;</span> bases_of<span class="op">(</span>info type, access_context ctx<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_77" id="pnum_77">6</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span>(type)
represents a class type that is complete from some point in the
evaluation context.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_78" id="pnum_78">7</a></span>
<em>Returns</em>: […]</p>
<div class="sourceCode" id="cb37"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> vector<span class="op">&lt;</span>info<span class="op">&gt;</span> static_data_members_of<span class="op">(</span>info type, access_context ctx<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_79" id="pnum_79">8</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>type<span class="op">)</span></code>
represents a class type that is complete from some point in the
evaluation context.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_80" id="pnum_80">9</a></span>
<em>Returns</em>: […]</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> vector<span class="op">&lt;</span>info<span class="op">&gt;</span> static_data_members_of<span class="op">(</span>info type, access_context ctx<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_81" id="pnum_81">10</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>type<span class="op">)</span></code>
represents a class type that is complete from some point in the
evaluation context.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_82" id="pnum_82">11</a></span>
<em>Returns</em>: […]</p>
<div class="sourceCode" id="cb39"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> vector<span class="op">&lt;</span>info<span class="op">&gt;</span> enumerators_of<span class="op">(</span>info type_enum<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_83" id="pnum_83">8</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>type_enum<span class="op">)</span></code>
represents an enumeration type and <code class="sourceCode cpp">is_enumerable_type<span class="op">(</span>type_enum<span class="op">)</span></code>
is <code class="sourceCode cpp"><span class="kw">true</span></code>.</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_84" id="pnum_84">9</a></span>
<em>Returns</em>: […]</p>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.layout-reflection-layout-queries">[meta.reflection.layout]
Reflection layout queries<a href="#meta.reflection.layout-reflection-layout-queries" class="self-link"></a></h3>
<p>Specify in terms of
<code class="sourceCode cpp"><em>DEALIAS</em></code> instead of
<code class="sourceCode cpp">dealias</code> to disallow entity proxies
from several functions.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb40"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">size_t</span> size_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_85" id="pnum_85">5</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
is a reflection of a type, object, value, variable of non-reference
type, […]</p>
<p>[…]</p>
<div class="sourceCode" id="cb41"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">size_t</span> alignment_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_86" id="pnum_86">7</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
is a reflection of a type, object, variable of non-reference type,
[…]</p>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_87" id="pnum_87">8</a></span>
<em>Returns</em>: […]</p>
<div class="sourceCode" id="cb42"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> <span class="dt">size_t</span> bit_size_of<span class="op">(</span>info r<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_88" id="pnum_88">9</a></span>
<em>Constant When</em>: <span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>r<span class="op">)</span></code>
is a reflection of a type, object, value, variable of non-reference
type, […]</p>
</blockquote>
</div>
<h3 class="unnumbered" id="meta.reflection.define.aggregate-reflection-class-definition-generation">[meta.reflection.define.aggregate]
Reflection class definition generation<a href="#meta.reflection.define.aggregate-reflection-class-definition-generation" class="self-link"></a></h3>
<p>Specify in terms of
<code class="sourceCode cpp"><em>DEALIAS</em></code> instead of
<code class="sourceCode cpp">dealias</code> to disallow entity proxies
from several functions.</p>
<div class="std">
<blockquote>
<div class="sourceCode" id="cb43"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="kw">consteval</span> info data_member_spec<span class="op">(</span>info type,</span>
<span id="cb43-2"><a href="#cb43-2" aria-hidden="true" tabindex="-1"></a>                                data_member_options options<span class="op">)</span>;</span></code></pre></div>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_89" id="pnum_89">4</a></span>
<em>Constant When</em>:</p>
<ul>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_90" id="pnum_90">(4.1)</a></span>
<span class="rm" style="color: #bf0303"><del><span><code class="sourceCode default">dealias</code></span></del></span><span class="addu"><code class="sourceCode cpp"><em>DEALIAS</em></code></span><code class="sourceCode cpp"><span class="op">(</span>type<span class="op">)</span></code>
represents either an object type or a reference type;</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_91" id="pnum_91">(4.2)</a></span>
[…]</li>
</ul>
</blockquote>
</div>
<h2 data-number="6.3" id="poll-2b-make-usingdecl-ill-formed-for-using-declarators"><span class="header-section-number">6.3</span> Poll 2b: Make <code class="sourceCode cpp"><span class="op">^^</span>Using<span class="op">::</span>Decl</code>
ill-formed for
<code class="sourceCode cpp"><em>using-declarator</em></code>s<a href="#poll-2b-make-usingdecl-ill-formed-for-using-declarators" class="self-link"></a></h2>
<p><span class="draftnote" style="color: #01796F">[ Drafting note: All
wording assumes D2996R13. ]</span></p>
<h3 class="unnumbered" id="expr.reflect-the-reflection-operator-1">[expr.reflect] The
reflection operator<a href="#expr.reflect-the-reflection-operator-1" class="self-link"></a></h3>
<p>Extend paragraph 5 to state that a
<code class="sourceCode cpp"><em>reflect-expression</em></code> is
ill-formed when it names a
<code class="sourceCode cpp"><em>using-declarator</em></code>.</p>
<div class="std">
<blockquote>
<p><span class="marginalizedparent"><a class="marginalized" href="#pnum_92" id="pnum_92">5</a></span>
If a <code class="sourceCode cpp"><em>reflect-expression</em></code>
<code class="sourceCode cpp"><em>R</em></code> matches the form <code class="sourceCode cpp"><span class="op">^^</span> <em>qualified-reflection-name</em></code>,
it is interpreted as such and its representation is determined as
follows:</p>
<ul>
<li><span class="addu"><span class="marginalizedparent"><a class="marginalized" href="#pnum_93" id="pnum_93">(5.*)</a></span>
If lookup for <code class="sourceCode cpp"><em>identifier</em></code>
finds a declaration that replaced a
<code class="sourceCode cpp"><em>using-declarator</em></code> during a
single search ([basic.lookup.general], [namespace.udecl]),
<code class="sourceCode cpp"><em>R</em></code> is
ill-formed.</span></li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_94" id="pnum_94">(5.1)</a></span>
<span class="addu">Otherwise,</span> <span class="rm" style="color: #bf0303"><del>I</del></span><span class="addu">i</span>f
the <code class="sourceCode cpp"><em>identifier</em></code> is a
<code class="sourceCode cpp"><em>namespace-name</em></code> that names a
namespace alias ([namespace.alias]),
<code class="sourceCode cpp"><em>R</em></code> represents that namespace
alias. For any other
<code class="sourceCode cpp"><em>namespace-name</em></code>,
<code class="sourceCode cpp"><em>R</em></code> represents the denoted
namespace.</li>
<li><span class="marginalizedparent"><a class="marginalized" href="#pnum_95" id="pnum_95">(5.2)</a></span>
[…]</li>
</ul>
</blockquote>
</div>
<h1 data-number="7" style="border-bottom:1px solid #cccccc" id="bibliography"><span class="header-section-number">7</span>
References<a href="#bibliography" class="self-link"></a></h1>
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="1" role="doc-bibliography">
<div id="ref-P2996R10" class="csl-entry" role="doc-biblioentry">
[P2996R10] Barry Revzin, Wyatt Childers, Peter Dimov, Andrew Sutton,
Faisal Vali, Daveed Vandevoorde, Dan Katz. 2025-02-27. Reflection for
C++26. <a href="https://wg21.link/p2996r10"><div class="csl-block">https://wg21.link/p2996r10</div></a>
</div>
<div id="ref-P2996R12" class="csl-entry" role="doc-biblioentry">
[P2996R12] Barry Revzin, Wyatt Childers, Peter Dimov, Andrew Sutton,
Faisal Vali, Daveed Vandevoorde, Dan Katz. 2025. Reflection for C++26.
<a href="https://wg21.link/p2996r12"><div class="csl-block">https://wg21.link/p2996r12</div></a>
</div>
<div id="ref-P2996R7" class="csl-entry" role="doc-biblioentry">
[P2996R7] Barry Revzin, Wyatt Childers, Peter Dimov, Andrew Sutton,
Faisal Vali, Daveed Vandevoorde, Dan Katz. 2024-10-13. Reflection for
C++26. <a href="https://wg21.link/p2996r7"><div class="csl-block">https://wg21.link/p2996r7</div></a>
</div>
<div id="ref-P3547R1" class="csl-entry" role="doc-biblioentry">
[P3547R1] Dan Katz, Ville Voutilainen. 2025-02-09. Modeling Access
Control With Reflection. <a href="https://wg21.link/p3547r1"><div class="csl-block">https://wg21.link/p3547r1</div></a>
</div>
<div id="ref-P3687R0" class="csl-entry" role="doc-biblioentry">
[P3687R0] Dan Katz, Daveed Vandevoorde, Ville Voutilainen. 2025. Final
Adjustments to C++26 Reflection. <a href="https://wg21.link/p3687r0"><div class="csl-block">https://wg21.link/p3687r0</div></a>
</div>
</div>
</div>
</div>
</body>
</html>
