Skip to content

Commit b0fb1eb

Browse files
committed
P2996R13 Reflection for C++26
1 parent 2e12f5e commit b0fb1eb

File tree

4 files changed

+1357
-1
lines changed

4 files changed

+1357
-1
lines changed

source/lib-intro.tex

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@
368368
and also define the function as deleted.
369369
\end{example}
370370

371+
\item
372+
\constantwhen
373+
the conditions that are required for a call to the function
374+
to be a constant subexpression\iref{defns.const.subexpr}.
375+
371376
\item
372377
\expects
373378
conditions that the function assumes to hold whenever it is called;
@@ -454,6 +459,7 @@
454459
Next, the semantics of the code sequence are determined by the
455460
\Fundescx{Constraints},
456461
\Fundescx{Mandates},
462+
\Fundescx{Constant When},
457463
\Fundescx{Preconditions},
458464
\Fundescx{Hardened preconditions},
459465
\Fundescx{Effects},
@@ -1248,6 +1254,7 @@
12481254
\tcode{<mdspan>} \\
12491255
\tcode{<memory>} \\
12501256
\tcode{<memory_resource>} \\
1257+
\tcode{<meta>} \\
12511258
\tcode{<mutex>} \\
12521259
\columnbreak
12531260
\tcode{<new>} \\
@@ -3082,6 +3089,26 @@
30823089
either a standard library non-static member function\iref{member.functions}
30833090
or an instantiation of a standard library member function template.
30843091

3092+
\pnum
3093+
Let \tcode{\placeholder{F}} denote
3094+
a standard library function or function template.
3095+
Unless \tcode{\placeholder{F}} is designated an addressable function,
3096+
it is unspecified if or how
3097+
a reflection value designating the associated entity can be formed.
3098+
%FIXME: Why is this not an example, but a note that begins with "For example"?
3099+
\begin{note}
3100+
For example, it is possible that \tcode{std::meta::members_of}
3101+
will not return reflections of standard library functions
3102+
that an implementation handles through an extra-linguistic mechanism.
3103+
\end{note}
3104+
3105+
\pnum
3106+
Let \tcode{\placeholder{F}} denote
3107+
a standard library class or class template specialization.
3108+
It is unspecified if or how
3109+
a reflection value can be formed to any private member of \tcode{\placeholder{F}},
3110+
or what the names of such members may be.
3111+
30853112
\pnum
30863113
A translation unit shall not declare namespace \tcode{std} to be an inline namespace\iref{namespace.def}.
30873114

source/macros.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@
363363
\newcommand{\required}{\Fundesc{Required behavior}}
364364
\newcommand{\constraints}{\Fundesc{Constraints}}
365365
\newcommand{\mandates}{\Fundesc{Mandates}}
366+
\newcommand{\constantwhen}{\Fundesc{Constant When}}
366367
\newcommand{\expects}{\Fundesc{Preconditions}}
367368
\newcommand{\hardexpects}{\Fundesc{Hardened preconditions}}
368369
\newcommand{\effects}{\Fundesc{Effects}}

0 commit comments

Comments
 (0)