<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <meta name="dcterms.date" content="2019-02-22" />
  <title>Reflection TS NB comment resolutions: summary and rationale</title>
  <style type="text/css">
      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%;}
  </style>
  <style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
  { position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
  { content: attr(title);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; pointer-events: all; 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;
    background-color: #ffffff;
    color: #a0a0a0;
  }
pre.numberSource { margin-left: 3em; border-left: 1px solid #a0a0a0;  padding-left: 4px; }
div.sourceCode
  { color: #1f1c1b; background-color: #ffffff; }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span. { color: #1f1c1b; } /* Normal */
code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
code span.an { color: #ca60ca; } /* Annotation */
code span.at { color: #0057ae; } /* Attribute */
code span.bn { color: #b08000; } /* BaseN */
code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #924c9d; } /* Char */
code span.cn { color: #aa5500; } /* Constant */
code span.co { color: #898887; } /* Comment */
code span.cv { color: #0095ff; } /* CommentVar */
code span.do { color: #607880; } /* Documentation */
code span.dt { color: #0057ae; } /* DataType */
code span.dv { color: #b08000; } /* DecVal */
code span.er { color: #bf0303; text-decoration: underline; } /* Error */
code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
code span.fl { color: #b08000; } /* Float */
code span.fu { color: #644a9b; } /* Function */
code span.im { color: #ff5500; } /* Import */
code span.in { color: #b08000; } /* Information */
code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
code span.op { color: #1f1c1b; } /* Operator */
code span.ot { color: #006e28; } /* Other */
code span.pp { color: #006e28; } /* Preprocessor */
code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #ff5500; } /* SpecialString */
code span.st { color: #bf0303; } /* String */
code span.va { color: #0057ae; } /* Variable */
code span.vs { color: #bf0303; } /* VerbatimString */
code span.wa { color: #bf0303; } /* Warning */
  </style>
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->
  
  <style type="text/css">
    code span.an { color: #1F1C1B; font-style: italic; }
    code span.in { color: #006E28; font-style: italic; }
    code span.wa { color: #BF0303; font-style: italic; }
  </style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">Reflection TS NB comment resolutions: summary and rationale</h1>

<table>
  <tr>
    <td>Document #: </td>
    <td>P1390R1</td>
  </tr>
  <tr>
    <td>Date: </td>
    <td>2019-02-22</td>
  </tr>
  <tr>
    <td style="vertical-align:top">Project: </td>
    <td>Programming Language C++<br>
SG7/Evolution/LEWG/LWG/Core<br>
    </td>
  </tr>
  <tr>
    <td style="vertical-align:top">Reply-to: </td>
    <td>
      Matúš Chochlík<br>&lt;<a href="mailto:chochlik@gmail.com" class="email">chochlik@gmail.com</a>&gt;<br>
      Axel Naumann<br>&lt;<a href="mailto:Axel.Naumann@cern.ch" class="email">Axel.Naumann@cern.ch</a>&gt;<br>
      David Sankel<br>&lt;<a href="mailto:dsankel@bloomberg.net" class="email">dsankel@bloomberg.net</a>&gt;<br>
    </td>
  </tr>
</table>

</header>
<nav id="TOC">
<h2 id="toctitle">Contents</h2>
<ul>
<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a></li>
<li><a href="#suggested-core-resolutions-ewg-cwg"><span class="toc-section-number">2</span> Suggested core resolutions (EWG / CWG)</a><ul>
<li><a href="#ch-004-04.3---sg10cwg"><span class="toc-section-number">2.1</span> CH 004 (04.3) - SG10/CWG</a></li>
<li><a href="#ch-005-06p1---cwg"><span class="toc-section-number">2.2</span> CH 005 (06p1) - CWG</a></li>
<li><a href="#ch-006-06p1---cwg"><span class="toc-section-number">2.3</span> CH 006 (06p1) - CWG</a></li>
<li><a href="#ca-008-08---cwg"><span class="toc-section-number">2.4</span> CA 008 (08) - CWG</a></li>
<li><a href="#pl-009-10.1.7.2-10.1.7.6---cwg"><span class="toc-section-number">2.5</span> PL 009 (10.1.7.2, 10.1.7.6) - CWG</a></li>
<li><a href="#ch-010-10.1.7.2---sg7ewg"><span class="toc-section-number">2.6</span> CH 010 (10.1.7.2) - SG7/EWG</a></li>
<li><a href="#ca-011-10.1.7.2---cwg"><span class="toc-section-number">2.7</span> CA 011 (10.1.7.2) - CWG</a></li>
<li><a href="#ch-013-10.1.7.6---cwg"><span class="toc-section-number">2.8</span> CH 013 (10.1.7.6) - CWG</a></li>
<li><a href="#ca-016-10.1.7.6-p1---cwg"><span class="toc-section-number">2.9</span> CA 016 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#ca-017-10.1.7.6-p1---cwg"><span class="toc-section-number">2.10</span> CA 017 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#ca-019-10.1.7.6-p1---cwg"><span class="toc-section-number">2.11</span> CA 019 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#ca-021-10.1.7.6-p1---cwg"><span class="toc-section-number">2.12</span> CA 021 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#us-024-10.1.7.6-p1---cwg"><span class="toc-section-number">2.13</span> US 024 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#us-025-10.1.7.6-p1---cwg"><span class="toc-section-number">2.14</span> US 025 (10.1.7.6 p1) - CWG</a></li>
<li><a href="#ch-026-17.7.2.1-p09.10---cwg"><span class="toc-section-number">2.15</span> CH 026 (17.7.2.1 p09.10) - CWG</a></li>
<li><a href="#ca-027-17.7.2.1-p1---cwg"><span class="toc-section-number">2.16</span> CA 027 (17.7.2.1 p1) - CWG</a></li>
<li><a href="#ch-029-21.12---cwg"><span class="toc-section-number">2.17</span> CH 029 (21.12) - CWG</a></li>
<li><a href="#ca-030-21.12---cwg"><span class="toc-section-number">2.18</span> CA 030 (21.12) - CWG</a></li>
<li><a href="#ca-031-21.12---sg7ewg"><span class="toc-section-number">2.19</span> CA 031 (21.12) - SG7/EWG</a></li>
<li><a href="#ch-032-21.12.2---cwg"><span class="toc-section-number">2.20</span> CH 032 (21.12.2) - CWG</a></li>
<li><a href="#pl-035-21.12.2---cwg"><span class="toc-section-number">2.21</span> PL 035 (21.12.2) - CWG</a></li>
<li><a href="#pl-036-21.12.2---sg7ewg"><span class="toc-section-number">2.22</span> PL 036 (21.12.2) - SG7/EWG</a></li>
<li><a href="#ch-039-21.12.2-21.12.3.9---cwg"><span class="toc-section-number">2.23</span> CH 039 (21.12.2, 21.12.3.9) - CWG</a></li>
<li><a href="#ch-040-21.12.3---sg7ewg"><span class="toc-section-number">2.24</span> CH 040 (21.12.3) - SG7/EWG</a></li>
<li><a href="#ch-041-21.12.3.10---sg7ewg"><span class="toc-section-number">2.25</span> CH 041 (21.12.3.10) - SG7/EWG</a></li>
<li><a href="#ch-042-21.12.3.18---sg7ewg"><span class="toc-section-number">2.26</span> CH 042 (21.12.3.18) - SG7/EWG</a></li>
<li><a href="#ch-043-21.12.3.6---cwg"><span class="toc-section-number">2.27</span> CH 043 (21.12.3.6) - CWG</a></li>
<li><a href="#ch-044-21.12.3.7---cwg"><span class="toc-section-number">2.28</span> CH 044 (21.12.3.7) - CWG</a></li>
<li><a href="#ca-045-21.12.4---cwg"><span class="toc-section-number">2.29</span> CA 045 (21.12.4) - CWG</a></li>
<li><a href="#ca-046-21.12.4---cwg"><span class="toc-section-number">2.30</span> CA 046 (21.12.4) - CWG</a></li>
<li><a href="#pl-047-21.12.4---sg7ewg"><span class="toc-section-number">2.31</span> PL 047 (21.12.4) - SG7/EWG</a></li>
<li><a href="#ca-049-21.12.4.1---cwg"><span class="toc-section-number">2.32</span> CA 049 (21.12.4.1) - CWG</a></li>
<li><a href="#ch-050-21.12.4.10-p1---cwg"><span class="toc-section-number">2.33</span> CH 050 (21.12.4.10 p1) - CWG</a></li>
<li><a href="#ca-052-21.12.4.16-p1---cwg"><span class="toc-section-number">2.34</span> CA 052 (21.12.4.16 p1) - CWG</a></li>
<li><a href="#ca-053-21.12.4.16---sg7ewg"><span class="toc-section-number">2.35</span> CA 053 (21.12.4.16) - SG7/EWG</a></li>
<li><a href="#pl-054-21.12.4.18---sg7ewg"><span class="toc-section-number">2.36</span> PL 054 (21.12.4.18) - SG7/EWG</a></li>
<li><a href="#ch-057-21.12.4.3-p2.1---sg7ewg"><span class="toc-section-number">2.37</span> CH 057 (21.12.4.3 p2.1) - SG7/EWG</a></li>
<li><a href="#ch-058-21.12.4.3---sg7ewg"><span class="toc-section-number">2.38</span> CH 058 (21.12.4.3) - SG7/EWG</a></li>
<li><a href="#ca-060-21.12.4.3-p2---cwg"><span class="toc-section-number">2.39</span> CA 060 (21.12.4.3 p2) - CWG</a></li>
<li><a href="#ca-061-21.12.4.3-p2---cwg"><span class="toc-section-number">2.40</span> CA 061 (21.12.4.3 p2) - CWG</a></li>
<li><a href="#ca-064-21.12.4.3-p2---cwg"><span class="toc-section-number">2.41</span> CA 064 (21.12.4.3 p2) - CWG</a></li>
<li><a href="#ca-065-and-ca-066-21.12.4.3-p2---cwg"><span class="toc-section-number">2.42</span> CA 065 and CA 066 (21.12.4.3 p2) - CWG</a></li>
<li><a href="#ca-068-21.12.4.3-p2---cwg"><span class="toc-section-number">2.43</span> CA 068 (21.12.4.3 p2) - CWG</a></li>
<li><a href="#ch-072-21.12.4.5---sg7ewg"><span class="toc-section-number">2.44</span> CH 072 (21.12.4.5) - SG7/EWG</a></li>
<li><a href="#ch-074-21.12.4.6---sg7ewg"><span class="toc-section-number">2.45</span> CH 074 (21.12.4.6) - SG7/EWG</a></li>
<li><a href="#us-075-21.12.4.6---cwg"><span class="toc-section-number">2.46</span> US 075 (21.12.4.6) - CWG</a></li>
<li><a href="#ch-078-21.12.4.7-and-many-others---cwg"><span class="toc-section-number">2.47</span> CH 078 (21.12.4.7 and many others) - CWG</a></li>
<li><a href="#ch-079-21.12.4.9---sg7ewg"><span class="toc-section-number">2.48</span> CH 079 (21.12.4.9) - SG7/EWG</a></li>
<li><a href="#ch-080-21.12.4.9---sg7ewg"><span class="toc-section-number">2.49</span> CH 080 (21.12.4.9) - SG7/EWG</a></li>
<li><a href="#ch-082-annex-c---cwg"><span class="toc-section-number">2.50</span> CH 082 (Annex C) - CWG</a></li>
<li><a href="#gb-083-annex-c---cwg"><span class="toc-section-number">2.51</span> GB 083 (Annex C) - CWG</a></li>
<li><a href="#gb-084-classes---cwg"><span class="toc-section-number">2.52</span> GB 084 (Classes) - CWG</a></li>
<li><a href="#ca-085-general---cwg"><span class="toc-section-number">2.53</span> CA 085 (General) - CWG!</a></li>
<li><a href="#gb-086-general-04.2---sg10cwg"><span class="toc-section-number">2.54</span> GB 086 (General, 04.2) - SG10/CWG</a></li>
</ul></li>
<li><a href="#suggested-library-resolutions-lewglwg"><span class="toc-section-number">3</span> Suggested library resolutions (LEWG/LWG)</a><ul>
<li><a href="#ca-028-20.5.1---lewg"><span class="toc-section-number">3.1</span> CA 028 (20.5.1) - LEWG</a></li>
<li><a href="#ch-056-21.12.4.2---sg7lwg"><span class="toc-section-number">3.2</span> CH 056 (21.12.4.2) - SG7/LWG</a></li>
</ul></li>
<li><a href="#suggested-editorial-resolutions"><span class="toc-section-number">4</span> Suggested editorial resolutions</a><ul>
<li><a href="#ca-069"><span class="toc-section-number">4.1</span> CA 069</a></li>
<li><a href="#ca-070"><span class="toc-section-number">4.2</span> CA 070</a></li>
<li><a href="#ca-071"><span class="toc-section-number">4.3</span> CA 071</a></li>
<li><a href="#ca-076"><span class="toc-section-number">4.4</span> CA 076</a></li>
</ul></li>
<li><a href="#acknowledgements"><span class="toc-section-number">5</span> Acknowledgements</a></li>
<li><a href="#references"><span class="toc-section-number">6</span> References</a></li>
</ul>
</nav>
<h1 id="introduction"><span class="header-section-number">1</span> Introduction</h1>
<p>This paper contains proposed resolutions to national body comments issued in <span class="citation" data-cites="N5325">[<a href="#ref-N5325">N5325</a>]</span> which summarizes responses to <span class="citation" data-cites="N4766">[<a href="#ref-N4766">N4766</a>]</span>, the proposed Reflection TS.</p>
<h1 id="suggested-core-resolutions-ewg-cwg"><span class="header-section-number">2</span> Suggested core resolutions (EWG / CWG)</h1>
<h2 id="ch-004-04.3---sg10cwg"><span class="header-section-number">2.1</span> CH 004 (04.3) - SG10/CWG</h2>
<p>See GB 086.</p>
<h2 id="ch-005-06p1---cwg"><span class="header-section-number">2.2</span> CH 005 (06p1) - CWG</h2>
<p>Reject, an alias-declaration is not a namespace-alias.</p>
<h2 id="ch-006-06p1---cwg"><span class="header-section-number">2.3</span> CH 006 (06p1) - CWG</h2>
<p>Recommend to reject the proposed change. The term <em>alias</em> can also refer to variable aliases.</p>
<p>Clarify by modifying the example in 21.12.3.4:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb1-1" title="1">  namespace N {</a>
<a class="sourceLine" id="cb1-2" title="2">     struct A;</a>
<a class="sourceLine" id="cb1-3" title="3">  }</a>
<a class="sourceLine" id="cb1-4" title="4">  namespace M {</a>
<a class="sourceLine" id="cb1-5" title="5">     using X = N::A;</a>
<a class="sourceLine" id="cb1-6" title="6">  }</a>
<a class="sourceLine" id="cb1-7" title="7"><span class="pp">+ struct B {</span></a>
<a class="sourceLine" id="cb1-8" title="8"><span class="pp">+    int i;</span></a>
<a class="sourceLine" id="cb1-9" title="9"><span class="pp">+ };</span></a>
<a class="sourceLine" id="cb1-10" title="10"><span class="pp">+ struct C {</span></a>
<a class="sourceLine" id="cb1-11" title="11"><span class="pp">+    using B::i;</span></a>
<a class="sourceLine" id="cb1-12" title="12"><span class="pp">+ };</span></a>
<a class="sourceLine" id="cb1-13" title="13">  using M_X_t = reflexpr(M::X);</a>
<a class="sourceLine" id="cb1-14" title="14">  using M_X_scope_t = get_scope_t&lt;M_X_t&gt;;</a>
<a class="sourceLine" id="cb1-15" title="15"><span class="pp">+ using C_i_t = reflexpr(C::i);</span></a>
<a class="sourceLine" id="cb1-16" title="16"><span class="pp">+ using C_i_scope_t = get_scope_t&lt;C_i_t&gt;;</span></a></code></pre></div>
<blockquote>
<p>The scope reflected by <code>M_X_scope_t</code> is <code>M</code>, not <code>N</code><span style="color: #006E28"><ins><span class="add">; the scope reflected by <code>C_i_scope_t</code> is <code>C</code>, not <code>B</code></span></ins></span>.</p>
</blockquote>
<h2 id="ca-008-08---cwg"><span class="header-section-number">2.4</span> CA 008 (08) - CWG</h2>
<p>Recommend to accept the proposed change with modification.</p>
<p>In 8.6, insert a new bullet 8.5, adjusting the subsequent bullet numbers:</p>
<blockquote>
<p><small>(8)</small> An expression is potentially constant evaluated if it is: … :::add <small>(8.5)</small> — a <em>reflexpr-operand</em>, :::</p>
</blockquote>
<p>Modify 10.1.7.6 as follows:</p>
<blockquote>
<p>Any other <em>reflexpr-operand</em> renders the program ill-formed.</p>
<p><span style="color: #006E28"><ins><span class="add">If the <em>reflexpr-operand</em> of the form <em>id-expression</em> is a constant expression, the type specified by the <em>reflexpr-specifier</em> also satisfies <code>reflect::Constant</code>.</span></ins></span></p>
</blockquote>
<p>(Note that the example provided as part of CA 008 is invalid as <code>reflexpr(foo(a))</code> specifies a type that satisfies <code>FunctionCallExpression</code>, not <code>Constant</code>.)</p>
<h2 id="pl-009-10.1.7.2-10.1.7.6---cwg"><span class="header-section-number">2.5</span> PL 009 (10.1.7.2, 10.1.7.6) - CWG</h2>
<p>Recommend to accept the proposed change with modifications. Modify</p>
<p>Modify the new final paragraph of 10.1.7.2 as follows:</p>
<blockquote>
<p>For a <em>reflexpr-operand</em> <code>x</code>, the type denoted by <code>reflexpr(x)</code> is <span style="color: #BF0303"><del><span class="rm">an implementation-defined</span></del></span> <span style="color: #006E28"><ins><span class="add">a</span></ins></span> type that satisfies the constraints laid out in 10.1.7.6.</p>
</blockquote>
<p>Modify 10.1.7.6 as follows:</p>
<blockquote>
<p><small>(1)</small> … A meta-object type is an <span style="color: #006E28"><ins><span class="add">unnamed,</span></ins></span> incomplete namespace-scope class type (Clause 12).</p>
<p>… <span style="color: #BF0303"><del><span class="rm">The type specified by the reflexpr-specifier is implementation-defined.</span></del></span></p>
</blockquote>
<h2 id="ch-010-10.1.7.2---sg7ewg"><span class="header-section-number">2.6</span> CH 010 (10.1.7.2) - SG7/EWG</h2>
<p>Propose to accept; this grammar is now allowed as part of <em>id-expression</em>, see CA 011.</p>
<h2 id="ca-011-10.1.7.2---cwg"><span class="header-section-number">2.7</span> CA 011 (10.1.7.2) - CWG</h2>
<p>Recommend to accept the proposed change.</p>
<p>Modify 10.1.7.2 as follows:</p>
<blockquote>
<div class="line-block"><em>reflexpr-operand:</em><br />
   <code>::</code><br />
   <em>type-id</em></div>
<div style="color: #BF0303">
<del>

<div class="rm">
<div class="line-block">   <em>nested-name-specifier<sub>opt</sub></em> <em>identifier</em><br />
   <em>nested-name-specifier<sub>opt</sub></em> <em>simple-template-id</em></div>
</div>

</del>
</div>
<div style="color: #006E28">
<ins>

<div class="add">
<div class="line-block">   <em>nested-name-specifier<sub>opt</sub></em> <em>namespace-name</em><br />
   <em>id-expression</em></div>
</div>

</ins>
</div>
</blockquote>
<p>Modify 10.1.7.6 as follows:</p>
<blockquote>
<div style="color: #BF0303">
<del>

<div class="rm">
<p>For an operand that is a parenthesized expression (8.4.3), the type satisfies <code>reflect::ParenthesizedExpression</code>. For a parenthesized expression <code>(E)</code>, whether or not itself nested inside a parenthesized expression, the expression <code>E</code> shall be either a parenthesized expression, a <em>function-call-expression</em> or a <em>functional-type-conv-expression</em>; otherwise the program is ill-formed.</p>
<p>For an operand of the form <em>function-call-expression</em>, the type satisfies <code>reflect::FunctionCallExpression</code>. If the <em>postfix-expression</em> of the <em>function-call-expression</em> is of class type, the function call shall not resolve to a surrogate call function (16.3.1.1.2). Otherwise, the <em>postfix-expression</em> shall name a function that is the unique result of overload resolution.</p>
<p>For an operand of the form <em>functional-type-conv-expression</em> (8.5.1.3), the type satisfies <code>reflect::FunctionalTypeConversion</code>. [ <em>Note:</em> The usual disambiguation between function-style cast and a <em>type-id</em> (11.2) applies. [ <em>Example:</em> The default constructor of class <code>X</code> can be reflected on as <code>reflexpr((X()))</code>, while <code>reflexpr(X())</code> reflects the type of a function returning <code>X</code>. — <em>end example</em> ] — <em>end note</em> ]</p>
<p>For an operand of the form <em>identifier</em> where <em>identifier</em> is a template <em>type-parameter</em>, the type satisfies both <code>reflect::Type</code> and <code>reflect::Alias</code>.</p>
</div>

</del>
</div>
<p><span style="color: #BF0303"><del><span class="rm">The <em>identifier</em> or <em>simple-template-id</em> is looked up using the rules for name lookup (6.4): if a <em>nested-name-specifier</em> is included in the operand, qualified lookup (6.4.3) of <em>nested-name-specifier</em> <em>identifier</em> or <em>nested-name-specifier</em> <em>simple-template-id</em> will be performed, otherwise unqualified lookup (6.4.1) of <em>identifier</em> or <em>simple-template-id</em> will be performed.</span></del></span> The type specified by the <em>reflexpr-specifier</em> satisfies concepts depending on the result of <span style="color: #BF0303"><del><span class="rm">the</span></del></span> name lookup, as shown in Table 12.</p>
<p><span style="color: #BF0303"><del><span class="rm">If the <em>reflexpr-operand</em> designates a <em>type-id</em> not explicitly mentioned in Table 12, the type represented by the <em>reflexpr-specifier</em> satisfies <code>reflect::Type</code>.</span></del></span> Any other <em>reflexpr-operand</em> renders the program ill-formed.</p>
</blockquote>
<p>Modify the caption of Table 12 as follows:</p>
<blockquote>
<p><code>reflect</code> concept (21.12.3) that the type specified by a <em>reflexpr-specifier</em> satisfies, for a given <em>reflexpr-operand</em> <span style="color: #BF0303"><del><span class="rm"><em>identifier</em> or <em>simple-template-id</em></span></del></span>.</p>
</blockquote>
<p>Replace Table 12 by the following table:</p>
<table>
<colgroup>
<col style="width: 11%"></col>
<col style="width: 47%"></col>
<col style="width: 41%"></col>
</colgroup>
<thead>
<tr class="header">
<th>Category</th>
<th><em>reflexpr-operand</em></th>
<th><code>reflect</code> Concept</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Type</td>
<td><em>class-name</em> designating a union</td>
<td><code>reflect::Record</code></td>
</tr>
<tr class="even">
<td></td>
<td><em>class-name</em> designating a closure type</td>
<td><code>reflect::Lambda</code></td>
</tr>
<tr class="odd">
<td></td>
<td><em>class-name</em> designating a non-union class</td>
<td><code>reflect::Class</code></td>
</tr>
<tr class="even">
<td></td>
<td><em>enum-name</em></td>
<td><code>reflect::Enum</code></td>
</tr>
<tr class="odd">
<td></td>
<td>template <em>type-parameter</em></td>
<td>both <code>reflect::Type</code> and <code>reflect::Alias</code></td>
</tr>
<tr class="even">
<td></td>
<td><em>type-name</em> introduced by a <em>using-declaration</em></td>
<td>both <code>reflect::Type</code> and <code>reflect::Alias</code></td>
</tr>
<tr class="odd">
<td></td>
<td>any other <em>typedef-name</em></td>
<td>both <code>reflect::Type</code> and <code>reflect::Alias</code></td>
</tr>
<tr class="even">
<td></td>
<td>any other <em>type-id</em></td>
<td><code>reflect::Type</code></td>
</tr>
<tr class="odd">
<td>Namespace</td>
<td><em>namespace-alias</em></td>
<td>both <code>reflect::Namespace</code> and <code>reflect::Alias</code></td>
</tr>
<tr class="even">
<td></td>
<td>any other <em>namespace-name</em></td>
<td><code>reflect::Namespace</code></td>
</tr>
<tr class="odd">
<td>Expression</td>
<td>the name of a data member</td>
<td><code>reflect::Variable</code></td>
</tr>
<tr class="even">
<td></td>
<td>the name of a variable or structured binding</td>
<td><code>reflect::Variable</code></td>
</tr>
<tr class="odd">
<td></td>
<td>the name of an enumerator</td>
<td><code>reflect::Enumerator</code></td>
</tr>
<tr class="even">
<td></td>
<td>the name of a function parameter</td>
<td><code>reflect::FunctionParameter</code></td>
</tr>
<tr class="odd">
<td></td>
<td>the name of a captured entity</td>
<td><code>reflect::LambdaCapture</code></td>
</tr>
<tr class="even">
<td></td>
<td>parenthesized expression; see Note A, below</td>
<td><code>reflect::ParenthesizedExpression</code></td>
</tr>
<tr class="odd">
<td></td>
<td><em>function-call-expression</em>; see Note B, below</td>
<td><code>reflect::FunctionCallExpression</code></td>
</tr>
<tr class="even">
<td></td>
<td><em>functional-type-conv-expression</em>; see Note C, below</td>
<td><code>reflect::FunctionalTypeConversion</code></td>
</tr>
</tbody>
</table>
<p>Add the following new paragraph after the table:</p>
<blockquote>
<div style="color: #006E28">
<ins>

<div class="add">
<p>Note A) For a parenthesized expression <code>(E)</code>, whether or not itself nested inside a parenthesized expression, the expression <code>E</code> shall be either a parenthesized expression, a <em>function-call-expression</em>, or a <em>functional-type-conv-expression</em>; otherwise the program is ill-formed.</p>
<p>Note B) If the <em>postfix-expression</em> of the <em>function-call-expression</em> is of class type, the function call shall not resolve to a surrogate call function (16.3.1.1.2). Otherwise, the <em>postfix-expression</em> shall name a function that is the unique result of overload resolution.</p>
<p>Note C) [ <em>Note:</em> The usual disambiguation between function-style cast and a <em>type-id</em> (11.2) applies. [ <em>Example:</em> The default constructor of class <code>X</code> can be reflected on as <code>reflexpr((X()))</code>, while <code>reflexpr(X())</code> reflects the type of a function returning <code>X</code>. — <em>end example</em> ] — <em>end note</em> ]</p>
</div>

</ins>
</div>
</blockquote>
<h2 id="ch-013-10.1.7.6---cwg"><span class="header-section-number">2.8</span> CH 013 (10.1.7.6) - CWG</h2>
<p>Recommend to accept the proposed change.</p>
<p>Modify 10.1.7.6 as follows:</p>
<blockquote>
<p>If the <em>reflexpr-operand</em> designates an entity or alias at block scope (6.3.3) or function <span style="color: #BF0303"><del><span class="rm">prototype</span></del></span><span style="color: #006E28"><ins><span class="add">parameter</span></ins></span> scope (6.3.4) and…</p>
</blockquote>
<h2 id="ca-016-10.1.7.6-p1---cwg"><span class="header-section-number">2.9</span> CA 016 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept the propsed change; <code>Constant</code> <em>reflexpr-operand</em>s are now explicitly called out by the recommended modifications in CA 011. Also modify 21.12.3.17 as follows:</p>
<blockquote>
<p>Constant<T> is true if and only if T reflects <span style="color: #BF0303"><del><span class="rm">a constant expression (8.6)</span></del></span> <span style="color: #006E28"><ins><span class="add">an enumerator or a <code>constexpr</code> variable</span></ins></span>.</p>
</blockquote>
<h2 id="ca-017-10.1.7.6-p1---cwg"><span class="header-section-number">2.10</span> CA 017 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept the proposed change. Similar to types represented by the <code>decltype</code> specifier, fundamental and <em>cv</em>-qualified types must not have a scope either. Only declarations should be <code>ScopeMember</code>s.</p>
<p>Modify Table 12 as follows:</p>
<blockquote>
<table>
<colgroup>
<col style="width: 2%"></col>
<col style="width: 34%"></col>
<col style="width: 63%"></col>
</colgroup>
<tbody>
<tr class="odd">
<td></td>
<td><span style="color: #006E28"><ins><span class="add"><em>decltype-specifier</em></span></ins></span></td>
<td><span style="color: #006E28"><ins><span class="add">both <code>reflect::Type</code> and <code>reflect::Alias</code></span></ins></span></td>
</tr>
<tr class="even">
<td></td>
<td><em>type-name</em> introduced by a <em>using-declaration</em></td>
<td><code>reflect::Type</code> <span style="color: #BF0303"><del><span class="rm">and</span></del></span><span style="color: #006E28"><ins><span class="add">,</span></ins></span> <code>reflect::Alias</code> <span style="color: #006E28"><ins><span class="add">, and <code>reflect::ScopeMember</code></span></ins></span></td>
</tr>
</tbody>
</table>
</blockquote>
<p>Modify 21.12.2 as follows:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb2-1" title="1"><span class="st">- template &lt;class T&gt; concept Enum;    // refines Type and Scope</span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="st">- template &lt;class T&gt; concept Record;  // refines Type and Scope</span></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="pp">+ template &lt;class T&gt; concept Enum;    // refines Type, Scope, and ScopeMember</span></a>
<a class="sourceLine" id="cb2-4" title="4"><span class="pp">+ template &lt;class T&gt; concept Record;  // refines Type, Scope, and ScopeMember</span></a>
<a class="sourceLine" id="cb2-5" title="5">  template &lt;class T&gt; concept Scope;   // refines Object</a>
<a class="sourceLine" id="cb2-6" title="6"><span class="st">- template &lt;class T&gt; concept Type;    // refines Named and ScopeMember</span></a>
<a class="sourceLine" id="cb2-7" title="7"><span class="pp">+ template &lt;class T&gt; concept Type;    // refines Named</span></a></code></pre></div>
<p>Modify 21.12.3.16 as follows:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb3-1" title="1"><span class="st">- template &lt;class T&gt; concept Type = Named&lt;T&gt; &amp;&amp; ScopeMember&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Type = Named&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Add a note at the end of 21.12.3.16:</p>
<blockquote>
<p><span style="color: #006E28"><ins><span class="add">[ <em>Note:</em> Some types <code>T</code> also satisfy <code>ScopeMember</code>; others, for instance those reflecting <em>cv</em>-qualified types or fundamental types, do not. — <em>end note</em> ]</span></ins></span></p>
</blockquote>
<h2 id="ca-019-10.1.7.6-p1---cwg"><span class="header-section-number">2.11</span> CA 019 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept the proposed change. Modify 10.1.7.6 as follows:</p>
<blockquote>
<div style="color: #BF0303">
<del>

<div class="rm">
<p>For a parenthesized expression <code>(E)</code>, whether or not itself nested inside a parenthesized expression, the expression <code>E</code> shall be either a parenthesized expression, a <em>function-call-expression</em> or a <em>functional-type-conv-expression</em>; otherwise the program is ill-formed.</p>
</div>

</del>
</div>
<div style="color: #006E28">
<ins>

<div class="add">
<p>For a <em>reflexpr-operand</em> that is a parenthesized expression <code>(E)</code>, <code>E</code> shall be a <em>function-call-expression</em>, <em>functional-type-conv-expression</em>, or an expression <code>(E&#39;)</code> that satisfies the requirements for being a <em>reflexpr-operand</em>.</p>
</div>

</ins>
</div>
</blockquote>
<h2 id="ca-021-10.1.7.6-p1---cwg"><span class="header-section-number">2.12</span> CA 021 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept the proposed change with modification. Modify 10.1.7.6 as follows:</p>
<blockquote>
<p>An entity or alias <span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> is <em>reflection-related</em> to an entity or alias <span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span> if</p>
<ul>
<li><code>A</code> and <code>B</code> are the same entity or alias,</li>
<li><code>A</code> is a variable or enumerator and <code>B</code> is the type of <code>A</code>,</li>
<li><code>A</code> is an enumeration and <code>B</code> is the underlying type of <code>A</code>,</li>
<li><code>A</code> is a class and <code>B</code> is a member or base class of <code>A</code>,</li>
<li><code>A</code> is a non-template alias that designates the entity <code>B</code>, <span style="color: #BF0303"><del><span class="rm">- <code>A</code> is a class nested in <code>B</code> (12.2.5),</span></del></span></li>
<li><code>A</code> is not the global namespace and <code>B</code> is an enclosing <span style="color: #006E28"><ins><span class="add">class or</span></ins></span> namespace of <code>A</code>,</li>
<li><span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span> is the parenthesized expression <code>(</code> <span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> <code>)</code>,</li>
<li><code>A</code> is a lambda capture of the closure type <code>B</code>,</li>
<li><code>A</code> is the closure type of the lambda capture <code>B</code>,</li>
<li><span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> is the type specified by the <em>functional-type-conv-expression</em> <span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span>,</li>
<li><span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> is the function selected by overload resolution for a <em>function-call-expression</em> <span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span>,</li>
<li><span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> is the return type, parameter type, or function type of the function <span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span>, or</li>
<li><span style="color: #BF0303"><del><span class="rm"><code>A</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>B</code></span></ins></span> is reflection-related to an entity or alias <code>X</code> and <code>X</code> is reflection-related to <span style="color: #BF0303"><del><span class="rm"><code>B</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>A</code></span></ins></span>.</li>
</ul>
</blockquote>
<p>Note: the modification to the suggested change consists in the clarification of enclosing classes, and the removal of the superfluous nested class case. The latter is subsumed by “member or base class of <code>A</code>”. The resolution was also modified to be such that <code>A</code> yields <code>B</code>, with a corresponding change in the position of <code>A</code> and <code>B</code> in the definition of the relation.</p>
<h2 id="us-024-10.1.7.6-p1---cwg"><span class="header-section-number">2.13</span> US 024 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept with modification. The intent is to disallow the following:</p>
<pre><code>int x;
void f() {
  extern int x;
  reflexpr(x); // ERROR
}</code></pre>
<p>See the modification in US 025.</p>
<h2 id="us-025-10.1.7.6-p1---cwg"><span class="header-section-number">2.14</span> US 025 (10.1.7.6 p1) - CWG</h2>
<p>Recommend to accept proposal with modification:</p>
<p>Modify 10.1.7.6 as follows (assuming acceptance of the proposed resolution of US 024):</p>
<blockquote>
<p>If the <em>reflexpr-operand</em> designates <span style="color: #BF0303"><del><span class="rm">an entity or alias declared at</span></del></span> <span style="color: #006E28"><ins><span class="add">a name whose declaration is enclosed in a</span></ins></span> block scope (6.3.3) or function prototype scope (6.3.4) and the <span style="color: #006E28"><ins><span class="add">named</span></ins></span> entity is neither captured nor a function parameter, the program is ill-formed.</p>
</blockquote>
<h2 id="ch-026-17.7.2.1-p09.10---cwg"><span class="header-section-number">2.15</span> CH 026 (17.7.2.1 p09.10) - CWG</h2>
<p>Recommend to accept to proposed modification of 17.7.2.1:</p>
<blockquote>
<ul>
<li>denoted by <code>reflexpr(</code><em>operand</em><code>)</code>, where <em>operand</em> designates a dependent type or a member of an unknown specialization <span style="color: #006E28"><ins><span class="add">or a value-dependent constant expression</span></ins></span>.</li>
</ul>
</blockquote>
<h2 id="ca-027-17.7.2.1-p1---cwg"><span class="header-section-number">2.16</span> CA 027 (17.7.2.1 p1) - CWG</h2>
<p>Recommend to accept the proposed modification of 17.7.2.1.</p>
<p>Add a new bullet after 9.9:</p>
<blockquote>
<div style="color: #006E28">
<ins>

<div class="add">
<ul>
<li>denoted by <code>reflexpr(</code><em>operand</em><code>)</code>, where <em>operand</em> is a type-dependent expression or a (possibly parenthesized) <em>functional-type-conv-expression</em> with at least one type-dependent immediate subexpression, or</li>
</ul>
</div>

</ins>
</div>
</blockquote>
<h2 id="ch-029-21.12---cwg"><span class="header-section-number">2.17</span> CH 029 (21.12) - CWG</h2>
<p>Recommend to reject the proposed modification, as <code>inline</code> is not needed (has no actual effect).</p>
<h2 id="ca-030-21.12---cwg"><span class="header-section-number">2.18</span> CA 030 (21.12) - CWG</h2>
<p>Recommend to accept the proposed change.</p>
<p>Modify 21.12.3.6 as follows:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb5-1" title="1"><span class="st">- template &lt;class T&gt; concept Enumerator = Typed&lt;T&gt; &amp;&amp; ScopeMember&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb5-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Enumerator = Constant&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.7 as follows:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb6-1" title="1"><span class="st">- template &lt;class T&gt; concept Variable = Typed&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb6-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Variable = Typed&lt;T&gt; &amp;&amp; ScopeMember&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.9 as follows:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb7-1" title="1"><span class="st">- template &lt;class T&gt; concept Typed = Named&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb7-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Typed = Object&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.10 as follows:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb8-1" title="1"><span class="st">- template &lt;class T&gt; concept Namespace = Scope&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb8-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Namespace = Named&lt;T&gt; &amp;&amp; Scope&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.17 as follows:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb9-1" title="1"><span class="st">- template &lt;class T&gt; concept Constant = ScopeMember&lt;T&gt; &amp;&amp; Typed&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb9-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Constant = Typed&lt;T&gt; &amp;&amp; ScopeMember&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.20 as follows (for consistency’s sake):</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb10-1" title="1"><span class="st">- template &lt;class T&gt; concept Callable = ScopeMember&lt;T&gt; &amp;&amp; Scope&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb10-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Callable = Scope&lt;T&gt; &amp;&amp; ScopeMember&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.25 as follows (for consistency’s sake):</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb11-1" title="1"><span class="st">- template &lt;class T&gt; concept Function = Callable&lt;T&gt; &amp;&amp; Typed&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb11-2" title="2"><span class="pp">+ template &lt;class T&gt; concept Function = Typed&lt;T&gt; &amp;&amp; Callable&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<p>Modify 21.12.3.31 as follows (for consistency’s sake):</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb12-1" title="1"><span class="st">- template &lt;class T&gt; concept ConversionOperator = Operator&lt;T&gt; &amp;&amp; MemberFunction&lt;T&gt; &amp;&amp; </span><span class="wa">see</span><span class="st"> </span><span class="wa">below</span><span class="st">;</span></a>
<a class="sourceLine" id="cb12-2" title="2"><span class="pp">+ template &lt;class T&gt; concept ConversionOperator = MemberFunction&lt;T&gt; &amp;&amp; Operator&lt;T&gt; &amp;&amp; </span><span class="in">see</span><span class="pp"> </span><span class="in">below</span><span class="pp">;</span></a></code></pre></div>
<h2 id="ca-031-21.12---sg7ewg"><span class="header-section-number">2.19</span> CA 031 (21.12) - SG7/EWG</h2>
<p>Recommend to accept the proposed change with modifications.</p>
<p>Modify 21.12.3.4 as follows:</p>
<blockquote>
<p><small>(2)</small> <span style="color: #BF0303"><del><span class="rm">Except for the type represented by the <code>reflexpr</code> operator, <code>Alias</code> properties resulting from type transformations (21.12.4) are not retained.</span></del></span><span style="color: #006E28"><ins><span class="add">Type transformations (21.12.4) never yield an <code>Alias</code>; instead, they yield the aliased entity.</span></ins></span></p>
</blockquote>
<p>At the end of the paragraph 2 of 21.12.4, add</p>
<blockquote>
<p><span style="color: #006E28"><ins><span class="add">Alias entities are not returned by meta-object operations (21.12.3.4).</span></ins></span></p>
</blockquote>
<p>Modify 21.12.4.7 as follows:</p>
<blockquote>
<p><small>(1)</small> A specialization of any of these templates with a meta-object type that is reflecting an incomplete type renders the program ill-formed. Such errors are not in the immediate context (17.9.2). <span style="color: #006E28"><ins><span class="add">Members introduced by <em>using-declaration</em>s (10.3.3) are included in the sequences below where applicable; the <code>Scope</code> of these members remains that of the declaration of the referenced entity. [ <em>Note:</em> These members are not <code>Aliase</code>s, see 21.12.4. A member injected into a derived class may have different access. — <em>end note</em> ]</span></ins></span></p>
</blockquote>
<blockquote>
<p><small>(2)</small> The nested type named <code>type</code> is an alias to an <code>ObjectSequence</code> specialized with <code>RecordMember</code> types that reflect the following subset of <span style="color: #006E28"><ins><span class="add">direct</span></ins></span> non-template members of the class reflected by <code>T</code>:</p>
</blockquote>
<h2 id="ch-032-21.12.2---cwg"><span class="header-section-number">2.20</span> CH 032 (21.12.2) - CWG</h2>
<p>Recommend to accept the proposed change with modification; variable templates have no immediate context which would allow them to be SFINAEd on.</p>
<p>Modify 21.12.2 as follows:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb13-1" title="1">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-2" title="2"><span class="pp">+ requires RecordMember&lt;T&gt; || Base&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-3" title="3">     constexpr auto is_public_v = is_public&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-4" title="4">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-5" title="5"><span class="pp">+ requires RecordMember&lt;T&gt; || Base&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-6" title="6">     constexpr auto is_protected_v = is_protected&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-7" title="7">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-8" title="8"><span class="pp">+ requires RecordMember&lt;T&gt; || Base&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-9" title="9">     constexpr auto is_private_v = is_private&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-10" title="10">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-11" title="11"><span class="pp">+ requires Variable&lt;T&gt; || Callable&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-12" title="12">     constexpr auto is_constexpr_v = is_constexpr&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-13" title="13">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-14" title="14"><span class="pp">+ requires Variable&lt;T&gt; || MemberFunction&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-15" title="15">     constexpr auto is_static_v = is_static&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-16" title="16">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-17" title="17"><span class="pp">+ requires Class&lt;T&gt; || MemberFunction&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-18" title="18">     constexpr auto is_final_v = is_final&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-19" title="19">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-20" title="20"><span class="pp">+ requires Constructor&lt;T&gt; || ConversionOperator&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-21" title="21">     constexpr auto is_explicit_v = is_explicit&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-22" title="22">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-23" title="23"><span class="pp">+ requires Namespace&lt;T&gt; || Callable&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-24" title="24">     constexpr auto is_inline_v = is_inline&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-25" title="25">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-26" title="26"><span class="pp">+ requires Base&lt;T&gt; || MemberFunction&lt;T&gt; || Destructor&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-27" title="27">     constexpr auto is_virtual_v = is_virtual&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-28" title="28">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-29" title="29"><span class="pp">+ requires MemberFunction&lt;T&gt; || Destructor&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-30" title="30">     constexpr auto is_pure_virtual_v = is_pure_virtual&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb13-31" title="31">  template &lt;class T&gt;</a>
<a class="sourceLine" id="cb13-32" title="32"><span class="pp">+ requires Variable&lt;T&gt; || Function&lt;T&gt;</span></a>
<a class="sourceLine" id="cb13-33" title="33">     constexpr auto get_pointer_v = get_pointer&lt;T&gt;::value;</a></code></pre></div>
<h2 id="pl-035-21.12.2---cwg"><span class="header-section-number">2.21</span> PL 035 (21.12.2) - CWG</h2>
<p>Recommend to reject. As 21.12.3.27 notes:</p>
<blockquote>
<p>Some types that satisfy <code>Constructor</code> also satisfy <code>SpecialMemberFunction</code>.</p>
</blockquote>
<p>The definition of <code>SpecialMemberFunction</code> (21.12.3.27) uses “special member function (Clause 15)” and thus clearly includes special member functions that are constructors.</p>
<h2 id="pl-036-21.12.2---sg7ewg"><span class="header-section-number">2.22</span> PL 036 (21.12.2) - SG7/EWG</h2>
<p>Recommend to reject the proposed change of renaming the concept <code>Object</code> to <code>Metaobject</code>:</p>
<p>The meta-nature of <code>std::reflect::Object</code> is stated by the namespace it is defined in. There is no need to repeat this meta-nature by prepending “Meta”.</p>
<h2 id="ch-039-21.12.2-21.12.3.9---cwg"><span class="header-section-number">2.23</span> CH 039 (21.12.2, 21.12.3.9) - CWG</h2>
<p>See CA 030.</p>
<h2 id="ch-040-21.12.3---sg7ewg"><span class="header-section-number">2.24</span> CH 040 (21.12.3) - SG7/EWG</h2>
<p>Recommend to accept the proposed modification by adding the following note to 21.12.3:</p>
<blockquote>
<p><span style="color: #006E28"><ins><span class="add">[ <em>Note:</em> unlike <code>std::is_enum</code>, <code>std::reflect::is_enum</code> operates on meta-object types. — <em>end note</em> ]</span></ins></span></p>
</blockquote>
<h2 id="ch-041-21.12.3.10---sg7ewg"><span class="header-section-number">2.25</span> CH 041 (21.12.3.10) - SG7/EWG</h2>
<p>See CA 030.</p>
<h2 id="ch-042-21.12.3.18---sg7ewg"><span class="header-section-number">2.26</span> CH 042 (21.12.3.18) - SG7/EWG</h2>
<p>Suggest to reject.</p>
<p>This is a misunderstanding. A ‘base’ in this case has a class which is accessible with <code>get_class</code>. This class then has a name.</p>
<h2 id="ch-043-21.12.3.6---cwg"><span class="header-section-number">2.27</span> CH 043 (21.12.3.6) - CWG</h2>
<p>See CA 030.</p>
<h2 id="ch-044-21.12.3.7---cwg"><span class="header-section-number">2.28</span> CH 044 (21.12.3.7) - CWG</h2>
<p>See CA 030.</p>
<h2 id="ca-045-21.12.4---cwg"><span class="header-section-number">2.29</span> CA 045 (21.12.4) - CWG</h2>
<p>See resolution to CA 071.</p>
<p>Note: the resolution here should be should also be applied to <span class="citation" data-cites="P1208R3">[<a href="#ref-P1208R3">P1208R3</a>]</span>.</p>
<h2 id="ca-046-21.12.4---cwg"><span class="header-section-number">2.30</span> CA 046 (21.12.4) - CWG</h2>
<p>Recommend to accept the proposed change, with modifications: the file name should not be represented as an NTMBS but NTBS since multi-byte has encoding implications.</p>
<p>Modify 21.12.4.3 as follows:</p>
<blockquote>
<p><small>(2)</small> All specializations of <code>get_name&lt;T&gt;</code> and <code>get_display_name&lt;T&gt;</code> shall meet the <code>UnaryTypeTrait</code> requirements (23.15.1) with a static data member named <code>value</code> of type <code>const char (&amp;)[N]</code>, referencing a static, constant expression character array (<span style="color: #BF0303"><del><span class="rm">NTBS</span></del></span> <span style="color: #006E28"><ins><span class="add">NTMBS</span></ins></span>) of length <code>N</code>, as if declared as <code>static constexpr char STR[N] = ...;</code>.</p>
</blockquote>
<p>Note: the resolution here should be should also be applied to <span class="citation" data-cites="P1208R3">[<a href="#ref-P1208R3">P1208R3</a>]</span>.</p>
<h2 id="pl-047-21.12.4---sg7ewg"><span class="header-section-number">2.31</span> PL 047 (21.12.4) - SG7/EWG</h2>
<p>It is unclear how (or if) such a thing can be implemented. At any rate, this is something that can be added in the future if we get implementation experience that suggests this is possible and desirable.</p>
<h2 id="ca-049-21.12.4.1---cwg"><span class="header-section-number">2.32</span> CA 049 (21.12.4.1) - CWG</h2>
<p>Recommend to accept with modification:</p>
<p>In 21.12.4.1, apply the following changes:</p>
<blockquote>
<p><small>(3)</small> … representing some offset from the start of the line (for <code>get_source_column&lt;T&gt;</code>) of <span style="color: #BF0303"><del><span class="rm">the most recent</span></del></span> <span style="color: #006E28"><ins><span class="add">a</span></ins></span> declaration of the entity or typedef described by <code>T</code>.</p>
</blockquote>
<blockquote>
<p><small>(4)</small> … The value of the NTBS is the presumed name of the source file (19.8) of <span style="color: #BF0303"><del><span class="rm">the most recent</span></del></span> <span style="color: #006E28"><ins><span class="add">a</span></ins></span> declaration of the entity or typedef described by <code>T</code>.</p>
</blockquote>
<p>This matches US 024 forbidding block-scope declarations as <em>reflexpr-operand</em>s.</p>
<h2 id="ch-050-21.12.4.10-p1---cwg"><span class="header-section-number">2.33</span> CH 050 (21.12.4.10 p1) - CWG</h2>
<p>Recommend to accept the proposed modification, by applying the following change to 21.12.4.10:</p>
<blockquote>
<p><small>(1)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to</span></del></span><span style="color: #006E28"><ins><span class="add">designates</span></ins></span> <code>reflexpr(X)</code>, where <code>X</code> is the base class <span style="color: #006E28"><ins><span class="add">(without retaining possible <code>Alias</code> properties, see 21.12.3.4)</span></ins></span> reflected by <code>T</code>.</p>
</blockquote>
<p>Also apply the change</p>
<blockquote>
<p>nested type named <code>type</code> that <span style="color: #BF0303"><del><span class="rm">is an alias to</span></del></span> <span style="color: #006E28"><ins><span class="add">designates</span></ins></span></p>
</blockquote>
<p>for all occurrences in the document.</p>
<h2 id="ca-052-21.12.4.16-p1---cwg"><span class="header-section-number">2.34</span> CA 052 (21.12.4.16 p1) - CWG</h2>
<p><code>reflexpr((X(X())))</code> does not invoke the copy constructor, due to guaranteed copy elision. An alternative approach to access constructors through an expression is <code>reflexpr((X(declval&lt;X&amp;&gt;())))</code>. A more reliable approach is to retrieve a class’s constructors, take the subset of special member functions, and find the copy constructor back.</p>
<p>We believe that no normative change is needed to address this NB comment. To clarify the intent, we recommend to accept the proposed change, adding the following note at the end of 21.12.4.16:</p>
<blockquote>
<div style="color: #006E28">
<ins>

<div class="add">
<p>[ <em>Note:</em> <code>get_constructor_t&lt;get_subexpression_t&lt;reflexpr((T(T())))&gt;&gt;</code> is ill-formed because the <em>functional-type-conv</em> expression does not perform overload resolution for a constructor (15.8.3). — <em>end note</em> ]</p>
</div>

</ins>
</div>
</blockquote>
<p><strong>NOTE TO THE EDITOR</strong>: this <em>Note</em> shall be dropped when rebasing on C++14.</p>
<h2 id="ca-053-21.12.4.16---sg7ewg"><span class="header-section-number">2.35</span> CA 053 (21.12.4.16) - SG7/EWG</h2>
<p>Recommend to accept the proposed change with modification.</p>
<p>Modify 21.12.4.16 as follows:</p>
<blockquote>
<p>For a <span style="color: #BF0303"><del><span class="rm">type conversion</span></del></span> <span style="color: #006E28"><ins><span class="add"><em>functional-type-conv-expression</em></span></ins></span> reflected by <code>T</code>, <span style="color: #BF0303"><del><span class="rm">the nested type named <code>type</code></span></del></span> <span style="color: #006E28"><ins><span class="add">let <code>S</code> be the type specified by the type conversion (8.5.1.3 [expr.type.conv]). If a constructor is used for the initialization of <code>S</code>, the type <code>get_constructor&lt;T&gt;::type</code></span></ins></span> is the <code>Constructor</code> reflecting <span style="color: #BF0303"><del><span class="rm">the constructor of the type specified by the type conversion, as selected by overload resolution. The program is ill-formed if no such constructor exists.</span></del></span> <span style="color: #006E28"><ins><span class="add">that constructor; otherwise, <code>get_constructor&lt;T&gt;</code> has no member named <code>type</code>.</span></ins></span> [ <em>Note:</em> For example, fundamental types (6.7.1) do not have constructors. — <em>end note</em> ]</p>
</blockquote>
<h2 id="pl-054-21.12.4.18---sg7ewg"><span class="header-section-number">2.36</span> PL 054 (21.12.4.18) - SG7/EWG</h2>
<p>Recommend to accept.</p>
<blockquote>
<p><small>(1)</small> All specializations of these templates shall meet the <code>UnaryTypeTrait</code> requirements (23.15.1). If their template parameter reflects a member function that is <code>static</code> (for <code>is_static</code>), <code>const</code> (for <code>is_const</code>), <code>volatile</code> (for <code>is_volatile</code>), declared with a <em>ref-qualifier</em> <code>&amp;</code> (for <code>has_lvalueref_qualifier</code>) or <code>&amp;&amp;</code> (for <code>has_rvalueref_qualifier</code>), implicitly or explicitly <code>virtual</code> (for <code>is_virtual</code>), pure virtual (for <code>is_pure_virtual</code>), or <span style="color: #BF0303"><del><span class="rm">marked with <code>override</code></span></del></span><span style="color: #006E28"><ins><span class="add">overrides a member function of a base class</span></ins></span> (for <code>is_override</code>) or <code>final</code> (for <code>is_final</code>), the base characteristic of the respective template specialization is <code>true_type</code>, otherwise it is <code>false_type</code>.</p>
</blockquote>
<h2 id="ch-057-21.12.4.3-p2.1---sg7ewg"><span class="header-section-number">2.37</span> CH 057 (21.12.4.3 p2.1) - SG7/EWG</h2>
<p>Recommend to reject.</p>
<p>This is already the existing behavior and lambda objects are specifically called out. See Section 21.12.4.3 paragraph 2.5. Lambda objects are not unnamed entities.</p>
<h2 id="ch-058-21.12.4.3---sg7ewg"><span class="header-section-number">2.38</span> CH 058 (21.12.4.3) - SG7/EWG</h2>
<p>Recommend to accept, see the resolution to CA 071.</p>
<p>Template aliases are not supported by N4766.</p>
<h2 id="ca-060-21.12.4.3-p2---cwg"><span class="header-section-number">2.39</span> CA 060 (21.12.4.3 p2) - CWG</h2>
<p>Recommend to accept, by applying the modification shown in CA 071.</p>
<h2 id="ca-061-21.12.4.3-p2---cwg"><span class="header-section-number">2.40</span> CA 061 (21.12.4.3 p2) - CWG</h2>
<p>See CH 058.</p>
<h2 id="ca-064-21.12.4.3-p2---cwg"><span class="header-section-number">2.41</span> CA 064 (21.12.4.3 p2) - CWG</h2>
<p>Recommend to accept, by applying the following modification to 21.12.4.3:</p>
<blockquote>
<p><small>(2.4.6)</small> - for <code>T</code> reflecting <span style="color: #BF0303"><del><span class="rm">all other <em>simple-type-specifiers</em></span></del></span><span style="color: #006E28"><ins><span class="add">a cv-unqualified fundamental type other than <code>std::nullptr_t</code></span></ins></span>, the name stated in the “Type” column of Table 9 in (10.1.7.2);</p>
</blockquote>
<h2 id="ca-065-and-ca-066-21.12.4.3-p2---cwg"><span class="header-section-number">2.42</span> CA 065 and CA 066 (21.12.4.3 p2) - CWG</h2>
<p>Recommend to accept CA 065 and CA 066, both with modifications.</p>
<p>See the resolution to CA 071.</p>
<h2 id="ca-068-21.12.4.3-p2---cwg"><span class="header-section-number">2.43</span> CA 068 (21.12.4.3 p2) - CWG</h2>
<p>See CH 058.</p>
<h2 id="ch-072-21.12.4.5---sg7ewg"><span class="header-section-number">2.44</span> CH 072 (21.12.4.5) - SG7/EWG</h2>
<p>Recommend to accept: <code>struct</code> and <code>class</code> are conceptually the same, and <code>std::reflect::is_struct</code> wrongly suggests the need of <code>std::is_struct</code>. To clearly distinguish the <code>std::is_class</code> type trait from these meta functions, we recommend to rename them as proposed in the NB comment.</p>
<p>Apply the following modification to 21.12.2:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb14-1" title="1"><span class="st">- template &lt;Type T&gt; struct is_class;</span></a>
<a class="sourceLine" id="cb14-2" title="2"><span class="pp">+ template &lt;Class T&gt; struct uses_class_key;</span></a>
<a class="sourceLine" id="cb14-3" title="3"><span class="st">- template &lt;Type T&gt; struct is_struct;</span></a>
<a class="sourceLine" id="cb14-4" title="4"><span class="pp">+ template &lt;Class T&gt; struct uses_struct_key;</span></a>
<a class="sourceLine" id="cb14-5" title="5">  template &lt;Type T&gt; struct is_union;</a>
<a class="sourceLine" id="cb14-6" title="6">  template &lt;Typed T&gt;</a>
<a class="sourceLine" id="cb14-7" title="7">    using get_type_t = typename get_type&lt;T&gt;::type;</a>
<a class="sourceLine" id="cb14-8" title="8">  template &lt;Type T&gt;</a>
<a class="sourceLine" id="cb14-9" title="9">    using get_reflected_type_t = typename get_reflected_type&lt;T&gt;::type;</a>
<a class="sourceLine" id="cb14-10" title="10">  template &lt;Type T&gt;</a>
<a class="sourceLine" id="cb14-11" title="11">    constexpr auto is_enum_v = is_enum&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb14-12" title="12"><span class="st">- template &lt;Type T&gt;</span></a>
<a class="sourceLine" id="cb14-13" title="13"><span class="st">-   constexpr auto is_class_v = is_class&lt;T&gt;::value;</span></a>
<a class="sourceLine" id="cb14-14" title="14"><span class="pp">+ template &lt;Class T&gt;</span></a>
<a class="sourceLine" id="cb14-15" title="15"><span class="pp">+   constexpr auto uses_class_key_v = uses_class_key&lt;T&gt;::value;</span></a>
<a class="sourceLine" id="cb14-16" title="16"><span class="st">- template &lt;Type T&gt;</span></a>
<a class="sourceLine" id="cb14-17" title="17"><span class="st">-   constexpr auto is_struct_v = is_struct&lt;T&gt;::value;</span></a>
<a class="sourceLine" id="cb14-18" title="18"><span class="pp">+ template &lt;Class T&gt;</span></a>
<a class="sourceLine" id="cb14-19" title="19"><span class="pp">+   constexpr auto uses_struct_key_v = uses_struct_key&lt;T&gt;::value;</span></a></code></pre></div>
<p>Apply the following modification to 21.12.4.5:</p>
<blockquote>
<p><code>template &lt;</code><span style="color: #BF0303"><del><span class="rm"><code>Type</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>Class</code></span></ins></span> <code>T&gt; struct</code> <span style="color: #BF0303"><del><span class="rm"><code>is_class</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_class_key</code></span></ins></span><code>;</code></p>
</blockquote>
<blockquote>
<p><code>template &lt;</code><span style="color: #BF0303"><del><span class="rm"><code>Type</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>Class</code></span></ins></span> <code>T&gt; struct</code> <span style="color: #BF0303"><del><span class="rm"><code>is_struct</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_struct_key</code></span></ins></span><code>;</code></p>
</blockquote>
<blockquote>
<p><small>(8)</small> All specializations of <span style="color: #BF0303"><del><span class="rm"><code>is_class</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_class_key</code></span></ins></span><code>&lt;T&gt;</code> and <span style="color: #BF0303"><del><span class="rm"><code>is_struct</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_struct_key</code></span></ins></span><code>&lt;T&gt;</code> shall meet the <code>UnaryTypeTrait</code> requirements (23.15.1). If <code>T</code> reflects a class <span style="color: #BF0303"><del><span class="rm">with</span></del></span> <span style="color: #006E28"><ins><span class="add">for which all declarations use</span></ins></span> <em>class-key</em> <code>class</code> (for <span style="color: #BF0303"><del><span class="rm"><code>is_class</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_class_key</code></span></ins></span><code>&lt;T&gt;</code>) or <code>struct</code> (for <span style="color: #BF0303"><del><span class="rm"><code>is_struct</code></span></del></span><span style="color: #006E28"><ins><span class="add"><code>uses_struct_key</code></span></ins></span><code>&lt;T&gt;</code>), the base characteristic of the respective template specialization is <code>true_type</code><span style="color: #BF0303"><del><span class="rm">, otherwise it is <code>false_type</code></span></del></span><span style="color: #006E28"><ins><span class="add">. If <code>T</code> reflects a class for which no declaration uses <em>class-key</em> <code>class</code> (for <code>uses_class_key&lt;T&gt;</code>) or <code>struct</code> (for <code>uses_struct_key&lt;T&gt;</code>), the base characteristic of the respective template specialization is <code>false_type</code>. Otherwise, it is unspecified whether the base characteristic is <code>true_type</code> or <code>false_type</code></span></ins></span>. <span style="color: #BF0303"><del><span class="rm">If the same class has redeclarations with both <em>class-key</em> <code>class</code> and <em>class-key</em> <code>struct</code>, the base characteristic of the template specialization of exactly one of <code>is_class&lt;T&gt;</code> and <code>is_struct&lt;T&gt;</code> can be <code>true_type</code>, the other template specialization is <code>false_type</code>; the actual choice of value is unspecified.</span></del></span></p>
</blockquote>
<h2 id="ch-074-21.12.4.6---sg7ewg"><span class="header-section-number">2.45</span> CH 074 (21.12.4.6) - SG7/EWG</h2>
<p>To allow future extensions of template reflection, we recommend to accept this comment with modification.</p>
<p>To represent the scope of template parameters also for variable templates, a new concept needs to be introduced, serving as the scope of template parameters. For the time being, this concept has no operations (beyond that of <code>Object</code>) defined.</p>
<p>Modify 21.12.2 as follows:</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode .diff"><code class="sourceCode diff"><a class="sourceLine" id="cb15-1" title="1">template &lt;class T&gt; concept ObjectSequence; // refines Object</a>
<a class="sourceLine" id="cb15-2" title="2"><span class="pp">+ template &lt;class T&gt; concept TemplateParameterScope; // refines Scope</span></a>
<a class="sourceLine" id="cb15-3" title="3">template &lt;class T&gt; concept Named; // refines Object</a></code></pre></div>
<p>Add a new paragraph 21.12.3.3, moving the existing 21.12.3.3 to 21.12.3.4, etc:</p>
<div style="color: #006E28">
<ins>

<div class="add">
<blockquote>
<p>21.12.3.3 Concept <code>TemplateParameterScope</code></p>
<p><code>template &lt;class T&gt; concept TemplateParameterScope = Scope&lt;T&gt; &amp;&amp;</code> <em><code>see below</code></em>;</p>
<p><code>TemplateParameterScope&lt;T&gt;</code> is <code>true</code> if and only if <code>T</code> is a <code>Scope</code> reflecting the scope of a template <em>type-parameter</em>, generated by a metaobject operation. [ <em>Note:</em> It represents the template parameter scope (6.3.9), providing a scope to the <code>Alias</code> reflecting a template <em>type-parameter</em>. — <em>end note</em> ].</p>
</blockquote>
</div>

</ins>
</div>
<p>Modify 21.12.3.4 as follows:</p>
<blockquote>
<p>[<em>Note:</em> The <code>Scope</code> of an <code>Alias</code> is the scope that the alias was injected into. <span style="color: #006E28"><ins><span class="add">For an <code>Alias</code> reflecting a template <em>type-parameter</em>, that scope is its <code>TemplateParameterScope</code>.</span></ins></span> — <em>end note</em> ]</p>
</blockquote>
<p>Add the following sentence to the end of 21.12.4.6, paragraph 2:</p>
<div style="color: #006E28">
<ins>

<div class="add">
<blockquote>
<p><small>(2)</small> … For a template <em>type-parameter</em>, this innermost scope is the <code>TemplateParameterScope</code> representing the template parameter scope in which it has been declared.</p>
</blockquote>
</div>

</ins>
</div>
<h2 id="us-075-21.12.4.6---cwg"><span class="header-section-number">2.46</span> US 075 (21.12.4.6) - CWG</h2>
<p>Recommend to accept the proposed change, by modifying 21.12.4.6 as follows:</p>
<blockquote>
<p><small>(2)</small> … class scope, enumeration scope, function scope <span style="color: #BF0303"><del><span class="rm">(in the case where the function’s parameters)</span></del></span>, or …</p>
</blockquote>
<h2 id="ch-078-21.12.4.7-and-many-others---cwg"><span class="header-section-number">2.47</span> CH 078 (21.12.4.7 and many others) - CWG</h2>
<p>Recommend to accept the proposed change.</p>
<p>Modify 21.12.4.7 as follows:</p>
<blockquote>
<p><small>(2)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>RecordMember</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>RecordMember</code> and</span></ins></span> reflect the following subset of non-template members of the class reflected by <code>T</code>:</p>
</blockquote>
<blockquote>
<p><small>(5)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>RecordMember</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>RecordMember</code> and</span></ins></span> reflect the following subset of function members of the class reflected by <code>T</code>:</p>
</blockquote>
<blockquote>
<p><small>(10)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>Type</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>Type</code> and</span></ins></span> reflect the following subset of types declared in the class reflected by <code>T</code>:</p>
</blockquote>
<blockquote>
<p><small>(13)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>Base</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>Base</code> and</span></ins></span> reflect the following subset of base classes of the class reflected by <code>T</code>:</p>
</blockquote>
<p>Modify 21.12.4.8 as follows:</p>
<blockquote>
<p><small>(2)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>Enumerator</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>Enumerator</code> and</span></ins></span> reflect the enumerators of the enumeration type reflected by <code>T</code>. …</p>
</blockquote>
<p>Modify 21.12.4.13 as follows:</p>
<blockquote>
<p><small>(1)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>FunctionParameter</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>FunctionParameter</code> and</span></ins></span> reflect the parameters of the function reflected by <code>T</code>. …</p>
</blockquote>
<p>Modify 21.12.4.23 as follows:</p>
<blockquote>
<p><small>(1)</small> … The nested type named <code>type</code> <span style="color: #BF0303"><del><span class="rm">is an alias to an <code>ObjectSequence</code> specialized with <code>LambdaCapture</code> types that</span></del></span><span style="color: #006E28"><ins><span class="add">designates a meta-object type satisfying <code>ObjectSequence</code>, containing elements which satisfy <code>LambdaCapture</code> and</span></ins></span> reflect the captures of the closure object reflected by <code>T</code>. …</p>
</blockquote>
<h2 id="ch-079-21.12.4.9---sg7ewg"><span class="header-section-number">2.48</span> CH 079 (21.12.4.9) - SG7/EWG</h2>
<p>The lack of an interface to determine thread-local storage duration is surprising; we recommend to accept the proposed modification.</p>
<p>Modify 21.12.2 as follows:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb16-1" title="1">  template &lt;Constant T&gt; struct get_constant;</a>
<a class="sourceLine" id="cb16-2" title="2">  template &lt;Variable T&gt; struct is_constexpr&lt;T&gt;;</a>
<a class="sourceLine" id="cb16-3" title="3">  template &lt;Variable T&gt; struct is_static&lt;T&gt;;</a>
<a class="sourceLine" id="cb16-4" title="4"><span class="pp">+ template &lt;Variable T&gt; struct is_thread_local;</span></a>
<a class="sourceLine" id="cb16-5" title="5">  template &lt;Variable T&gt; struct get_pointer&lt;T&gt;;</a>
<a class="sourceLine" id="cb16-6" title="6"></a>
<a class="sourceLine" id="cb16-7" title="7">  template &lt;Constant T&gt;</a>
<a class="sourceLine" id="cb16-8" title="8">           constexpr auto get_constant_v = get_constant&lt;T&gt;::value;</a>
<a class="sourceLine" id="cb16-9" title="9"><span class="pp">+ template &lt;Variable T&gt;</span></a>
<a class="sourceLine" id="cb16-10" title="10"><span class="pp">+          constexpr auto is_thread_local_v = is_thread_local&lt;T&gt;::value;</span></a></code></pre></div>
<p>Modify paragraph 4 of 21.12.4.9 as follows:</p>
<blockquote>
<p><small>(3)</small> <code>template &lt;Variable T&gt; struct is_static&lt;T&gt;;</code></p>
<p><small>(4)</small> <span style="color: #006E28"><ins><span class="add"><code>template &lt;Variable T&gt; struct is_thread_local;</code></span></ins></span></p>
<p>All specializations of <code>is_static&lt;T&gt;</code> <span style="color: #006E28"><ins><span class="add">and <code>is_thread_local&lt;T&gt;</code></span></ins></span> shall meet the <code>UnaryTypeTrait</code> requirements (23.15.1). If <code>T</code> reflects a variable with static <span style="color: #006E28"><ins><span class="add">(for <code>is_static</code>) or thread (for <code>is_thread_local</code>)</span></ins></span> storage duration, the base characteristic of the respective template specialization is <code>true_type</code>, otherwise it is <code>false_type</code>.</p>
</blockquote>
<h2 id="ch-080-21.12.4.9---sg7ewg"><span class="header-section-number">2.49</span> CH 080 (21.12.4.9) - SG7/EWG</h2>
<p>Recommend to accept the proposed change, by adding the following sentence at the beginning of paragraph 4:</p>
<blockquote>
<p><small>(4)</small> <span style="color: #BF0303"><del><span class="rm">All specializations</span></del></span> <span style="color: #006E28"><ins><span class="add">If <code>T</code> reflects a reference with static storage duration, and the reference has no prior initialization or has not been initialized with an object of static storage duration, the specialization of <code>get_pointer&lt;T&gt;</code> has no member named <code>type</code>. Otherwise, the specialization</span></ins></span> of <code>get_pointer&lt;T&gt;</code> shall meet the <code>UnaryTypeTrait</code> requirements (23.15.1),…</p>
</blockquote>
<h2 id="ch-082-annex-c---cwg"><span class="header-section-number">2.50</span> CH 082 (Annex C) - CWG</h2>
<p>Recommend to accept the proposed change, by editing paragraph 1 in C.5.1 Clause 5: lexical conventions [diff.cpp17.lex]:</p>
<blockquote>
<p><small>(1)</small> <strong>Rationale:</strong> Required for new features. The <code>requires</code> keyword is added to introduce constraints through a <em>requires-clause</em> or a <em>requires-expression</em>. The <code>concept</code> keyword is added to enable the definition of concepts (17.6.8). <span style="color: #006E28"><ins><span class="add">The <code>reflexpr</code> keyword is added to introduce meta-data through a <em>reflexpr-specifier</em>.</span></ins></span></p>
<p><strong>Effect on original feature:</strong> Valid ISO C++ 2017 code using <code>concept</code><span style="color: #BF0303"><del><span class="rm">or</span></del></span><span style="color: #006E28"><ins><span class="add">,</span></ins></span> <code>requires</code><span style="color: #006E28"><ins><span class="add">, or <code>reflexpr</code></span></ins></span> as an identifier is not valid in this International Standard.</p>
</blockquote>
<h2 id="gb-083-annex-c---cwg"><span class="header-section-number">2.51</span> GB 083 (Annex C) - CWG</h2>
<p>See CH 082.</p>
<h2 id="gb-084-classes---cwg"><span class="header-section-number">2.52</span> GB 084 (Classes) - CWG</h2>
<p>See CH 013.</p>
<h2 id="ca-085-general---cwg"><span class="header-section-number">2.53</span> CA 085 (General) - CWG!</h2>
<p>The authors believe that this comment should be addressed to CWG, rather than SG7/LEWG.</p>
<p>The authors recommend to add a new final sentence to the last paragraph of 10.1.7.6 as follows:</p>
<div style="color: #006E28">
<ins>

<div class="add">
<blockquote>
<p>Reflecting directly or indirectly upon <code>std::align_val_t</code> [basic.stc.dynamic] without inclusion of the header <code>&lt;new&gt;</code> is ill-formed; no diagnostic required.</p>
</blockquote>
</div>

</ins>
</div>
<h2 id="gb-086-general-04.2---sg10cwg"><span class="header-section-number">2.54</span> GB 086 (General, 04.2) - SG10/CWG</h2>
<p>Propose to accept the suggested modification, by inserting a new 4.3 between 4.2 and 4.3:</p>
<div style="color: #006E28">
<ins>

<div class="add">
<blockquote>
<p>4.3 Feature-testing recommendations [intro.features]</p>
<p><small>(1)</small> An implementation that provides support for this Technical Specification shall define the feature test macros in Table 2.</p>
<table>
<thead>
<tr class="header">
<th style="text-align: left;">Macro name</th>
<th style="text-align: left;">Value</th>
<th>Header</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">__cpp_reflection</td>
<td style="text-align: left;">201902</td>
<td>none</td>
</tr>
<tr class="even">
<td style="text-align: left;">__cpp_lib_reflection</td>
<td style="text-align: left;">201902</td>
<td><code>&lt;reflect&gt;</code></td>
</tr>
</tbody>
</table>
<p>Table 2 - Feature-test macro(s)</p>
</blockquote>
</div>

</ins>
</div>
<h1 id="suggested-library-resolutions-lewglwg"><span class="header-section-number">3</span> Suggested library resolutions (LEWG/LWG)</h1>
<h2 id="ca-028-20.5.1---lewg"><span class="header-section-number">3.1</span> CA 028 (20.5.1) - LEWG</h2>
<p>Suggestion to accept this request.</p>
<ul>
<li>Add <code>&lt;experimental/reflect&gt;</code> to Table 19 “C++ headers for freestanding implementations” referenced by 20.5.1.3.</li>
</ul>
<h2 id="ch-056-21.12.4.2---sg7lwg"><span class="header-section-number">3.2</span> CH 056 (21.12.4.2) - SG7/LWG</h2>
<p>Modify definition of <code>unpack_sequence_t</code> from [reflect.synopsis] as follows.</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode diff"><code class="sourceCode diff"><a class="sourceLine" id="cb17-1" title="1">  template &lt;template &lt;class...&gt; class Tpl, ObjectSequence T&gt;</a>
<a class="sourceLine" id="cb17-2" title="2"><span class="st">-   constexpr auto unpack_sequence_t = unpack_sequence&lt;Tpl, T&gt;::type;</span></a>
<a class="sourceLine" id="cb17-3" title="3"><span class="pp">+   using unpack_sequence_t = typename unpack_sequence&lt;Tpl, T&gt;::type;</span></a></code></pre></div>
<h1 id="suggested-editorial-resolutions"><span class="header-section-number">4</span> Suggested editorial resolutions</h1>
<h2 id="ca-069"><span class="header-section-number">4.1</span> CA 069</h2>
<p>Suggest to reject; insufficient motivation for a change.</p>
<h2 id="ca-070"><span class="header-section-number">4.2</span> CA 070</h2>
<p>Suggest to accept with modification.</p>
<p>See the resolution to CA 071.</p>
<h2 id="ca-071"><span class="header-section-number">4.3</span> CA 071</h2>
<p>Suggest to accept the proposed change with modifications; this is a non-editorial change.</p>
<p>Replace the bulleted list of 21.12.4.3/2 by the following:</p>
<blockquote>
<p>The value of <code>get_display_name_v&lt;T&gt;</code> is the empty string if <code>T</code> reflects an unnamed entity; otherwise the value is implementation defined.</p>
<p>The value of <code>get_name_v&lt;T&gt;</code> refers to a string literal whose <em>s-char-sequence</em> is obtained by the first matching case in the following list:</p>
<ul>
<li>for <code>T</code> reflecting an alias, the unqualified name of the aliasing declaration;</li>
<li>for <code>T</code> reflecting an unnamed entity, the empty string.</li>
<li>for <code>T</code> reflecting a specialization of a class, function (except for conversion functions, constructors, operator functions, or literal operators), or variable template, its <em>template-name</em>;</li>
<li>for <code>T</code> reflecting a <em>cv</em>-unqualified type that is
<ul>
<li>a <em>type-parameter</em>, the identifier introduced by the <em>type-parameter</em>;</li>
<li>a class type, its <em>class-name</em>;</li>
<li>an enumeration type, its <em>enum-name</em>;</li>
<li>a fundamental type other than <code>std::nullptr_t</code>, the name stated in the “Type” column of Table 9 in (10.1.7.2);</li>
</ul></li>
<li>for <code>T</code> reflecting
<ul>
<li>a namespace, its <em>namespace-name</em>;</li>
<li>a variable, enumerator, data member, or function, its unqualified name;</li>
<li>a function parameter, its name;</li>
<li>a constructor, the <em>injected-class-name</em> of its class;</li>
<li>a destructor, the <em>injected-class-name</em> of its class, prefixed by the character ’~’;</li>
<li>an operator function, the operator element of the relevant <em>operator-function-id</em>;</li>
<li>a literal operator, the <em>s-char-sequence</em> <code>\&quot;\&quot;</code> followed by the literal suffix identifier of the operator’s <em>literal-operator-id</em>;</li>
<li>a conversion function, the same characters as <code>get_name_v&lt;R&gt;</code>, with <code>R</code> reflecting the type represented by the <em>conversion-type-id</em>.</li>
</ul></li>
<li>In all other cases, the string’s value is the empty string.</li>
</ul>
</blockquote>
<h2 id="ca-076"><span class="header-section-number">4.4</span> CA 076</h2>
<p>Suggest to reject. It is clear enough as is.</p>
<h1 id="acknowledgements"><span class="header-section-number">5</span> Acknowledgements</h1>
<p>Special thanks to Michael Park who is responsible for the pandoc extensions <span class="citation" data-cites="PBLOG">[<a href="#ref-PBLOG">PBLOG</a>]</span> used to create this paper.</p>
<h1 id="references"><span class="header-section-number">6</span> References</h1>
<p>    </p>
<div id="refs" class="references">
<div id="ref-N4766">
<p>[N4766] Matúš Chochlík, Axel Naumann, and David Sankel. 2018. Working Draft, C++ Extensions for Reflection. <br />
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4766.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4766.pdf</a></p>
</div>
<div id="ref-N5325">
<p>[N5325] Secretariat: ANSI (United States). 2018. Summary of Voting on PDTS 23619, Technical Specification – C++ Extensions for Reflection. </p>
</div>
<div id="ref-P1208R3">
<p>[P1208R3] Robert Douglas and Corentin Jabot. 2018. Source-Code Information Capture. <br />
<a href="https://wg21.link/P1208R3">https://wg21.link/P1208R3</a></p>
</div>
<div id="ref-PBLOG">
<p>[PBLOG] Michael Park. 2018. How I format my C++ papers. <br />
<a href="https://mpark.github.io/programming/2018/11/16/how-i-format-my-cpp-papers/">https://mpark.github.io/programming/2018/11/16/how-i-format-my-cpp-papers/</a></p>
</div>
</div>
</body>
</html>
