Skip to content

Commit 09210c9

Browse files
authored
Merge 2025-11 CWG Motion 2
P3921R0 Core Language Working Group "ready" Issues for the November, 2025 meeting; issues (non-DR) 2917, 2923, 3005, 3043, 3044, 3045, 3048, 3053, 3061, 3063, 3074, 3082, 3084, 3089, 3092, 3093, 3094, 3095, 3098, 3099, 3101, 3108, 3109, 3110, 3113, 3114, 3115, 3117, and 3118.
2 parents cd27e1f + 80f2385 commit 09210c9

File tree

10 files changed

+211
-131
lines changed

10 files changed

+211
-131
lines changed

source/basic.tex

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@
405405
an array operand, the set contains the potential results of that operand.
406406
\item If $E$ is a class member access
407407
expression\iref{expr.ref} of the form
408-
$E_1$ \tcode{.} \opt{\keyword{template}} $E_2$
409-
naming a non-static data member,
408+
$E_1$ \tcode{.} \opt{\keyword{template}} $E_2$,
409+
where $E_2$ designates a a non-static data member or
410+
a direct base class relationship,
410411
the set contains the potential results of $E_1$.
411412
\item If $E$ is a class member access expression
412413
naming a static data member,
@@ -1137,7 +1138,7 @@
11371138
if its name is \tcode{_} (\unicode{005f}{low line}) and it declares
11381139
\begin{itemize}
11391140
\item
1140-
a variable with automatic storage duration,
1141+
a variable, other than a function parameter, with automatic storage duration,
11411142
\item
11421143
a structured binding
11431144
%FIXME: "and" is strange below; maybe reword to something like:
@@ -1440,8 +1441,8 @@
14401441
\grammarterm{compound-statement} of a \grammarterm{lambda-expression},
14411442
\grammarterm{function-body}, or \grammarterm{function-try-block},
14421443
\item
1443-
substatement of a selection or iteration statement
1444-
that is not itself a selection or iteration statement, or
1444+
substatement of a selection, iteration, or expansion statement
1445+
that is not itself a selection, iteration, or expansion statement, or
14451446
\item
14461447
\grammarterm{handler} of a \grammarterm{function-try-block}
14471448
\end{itemize}
@@ -3272,6 +3273,8 @@
32723273
\item
32733274
an entity, value, or object that is TU-local,
32743275
\item
3276+
an annotation\iref{dcl.attr.annotation},
3277+
\item
32753278
a direct base class relationship $(D, B)$\iref{class.derived.general}
32763279
for which either $D$ or $B$ is TU-local, or
32773280
\item
@@ -3667,6 +3670,24 @@
36673670
the address of an unspecified byte of storage
36683671
occupied by the complete object of that subobject.
36693672

3673+
\pnum
3674+
The \defnx{constituent values}{constituent value} of an object $o$ are
3675+
\begin{itemize}
3676+
\item
3677+
if $o$ has scalar type, the value of $o$;
3678+
\item
3679+
otherwise, the constituent values of any direct subobjects of $o$
3680+
other than inactive union members.
3681+
\end{itemize}
3682+
The \defnx{constituent references}{constituent reference} of an object $o$ are
3683+
\begin{itemize}
3684+
\item
3685+
any direct members of $o$ that have reference type, and
3686+
\item
3687+
the constituent references of any direct subobjects of $o$
3688+
other than inactive union members.
3689+
\end{itemize}
3690+
36703691
\pnum
36713692
Some operations are described as
36723693
\defnx{implicitly creating objects}{object!implicit creation}
@@ -4909,24 +4930,32 @@
49094930
\pnum
49104931
The fourth context is when a temporary object
49114932
is created in the \grammarterm{for-range-initializer} of
4912-
either a range-based \keyword{for} statement
4913-
or an enumerating expansion statement\iref{stmt.expand}.
4933+
a range-based \keyword{for} statement.
49144934
If such a temporary object would otherwise be destroyed
49154935
at the end of the \grammarterm{for-range-initializer} full-expression,
49164936
the object persists for the lifetime of the reference
49174937
initialized by the \grammarterm{for-range-initializer}.
49184938

49194939
\pnum
4920-
The fifth context is when a temporary object is created
4940+
The fifth context is when a temporary object is created in an element $E$
4941+
of the \grammarterm{expansion-init-list}
4942+
of an enumerating expansion statement\iref{stmt.expand}.
4943+
If such a temporary object would otherwise be destroyed
4944+
at the end of the full-expression of $E$,
4945+
the object persists for the lifetime of the \grammarterm{for-range-declaration}
4946+
initialized from $E$.
4947+
4948+
\pnum
4949+
The sixth context is when a temporary object is created
49214950
in the \grammarterm{expansion-initializer}
4922-
of an iterating or destructuring expansion statement.
4951+
of a destructuring expansion statement.
49234952
If such a temporary object would otherwise be destroyed
49244953
at the end of that \grammarterm{expansion-initializer},
49254954
the object persists for the lifetime of the reference
49264955
initialized by the \grammarterm{expansion-initializer}, if any.
49274956

49284957
\pnum
4929-
The sixth context is when a temporary object
4958+
The seventh context is when a temporary object
49304959
is created in a structured binding declaration\iref{dcl.struct.bind}.
49314960
Any temporary objects introduced by
49324961
the \grammarterm{initializer}{s} for the variables
@@ -5304,9 +5333,17 @@
53045333
layout-compatible standard-layout class types\iref{class.mem}.
53055334

53065335
\pnum
5307-
A type is \defn{consteval-only} if it is either
5308-
\tcode{std::meta::info} or
5309-
a type compounded from a consteval-only type\iref{basic.compound}.
5336+
A type is \defn{consteval-only} if it is
5337+
\begin{itemize}
5338+
\item \tcode{std::meta::info},
5339+
\item \cv{}~\tcode{T}, where \tcode{T} is a consteval-only type,
5340+
\item a pointer or reference to a consteval-only type,
5341+
\item an array of consteval-only type,
5342+
\item a function type having a return type or any parameter type that is consteval-only,
5343+
\item a class type with any non-static data member having consteval-only type, or
5344+
\item a type ``pointer to member of class \tcode{C} of type \tcode{T}'',
5345+
where at least one of \tcode{C} or \tcode{T} is a consteval-only type.
5346+
\end{itemize}
53105347
Every object of consteval-only type shall be
53115348
\begin{itemize}
53125349
\item
@@ -5317,6 +5354,8 @@
53175354
an object whose lifetime begins and ends
53185355
during the evaluation of a core constant expression.
53195356
\end{itemize}
5357+
Every function of consteval-only type shall be
5358+
an immediate function\iref{expr.const}.
53205359

53215360
\rSec2[basic.fundamental]{Fundamental types}
53225361

@@ -7024,13 +7063,6 @@
70247063
observable behavior of the abstract machine.
70257064
\end{example}
70267065

7027-
\pnum
7028-
\begin{note}
7029-
Because of this and the preceding requirement regarding what threads of execution
7030-
have to perform eventually, it follows that no thread of execution can execute
7031-
forever without an execution step occurring.
7032-
\end{note}
7033-
70347066
\pnum
70357067
A thread of execution \defnx{makes progress}{make progress!thread}
70367068
when an execution step occurs or a

source/classes.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,8 +4187,9 @@
41874187
\indextext{function!virtual|)}
41884188

41894189
\pnum
4190-
A \keyword{consteval} virtual function shall not override
4191-
a virtual function that is not \keyword{consteval}.
4190+
A class with a \keyword{consteval} virtual function that overrides
4191+
a virtual function that is not \keyword{consteval}
4192+
shall have consteval-only type\iref{basic.types.general}.
41924193
A \keyword{consteval} virtual function shall not be overridden by
41934194
a virtual function that is not \keyword{consteval}.
41944195

@@ -5179,7 +5180,8 @@
51795180
\pnum
51805181
An additional access check beyond those described earlier in \ref{class.access}
51815182
is applied when a non-static data member or non-static member function is a
5182-
protected member of its designating class\iref{class.access.base}.
5183+
protected member of its designating class\iref{class.access.base}
5184+
and is not designated by a \grammarterm{splice-expression}.
51835185
\begin{footnote}
51845186
This
51855187
additional check does not apply to other members,
@@ -5188,9 +5190,11 @@
51885190
As described earlier, access to a protected member is granted because the
51895191
reference occurs in a friend or direct member of some class \tcode{C}. If the access is
51905192
to form a pointer to member\iref{expr.unary.op}, the
5191-
\grammarterm{nested-name-specifier} shall denote \tcode{C} or a class derived from
5192-
\tcode{C}. All other accesses involve a (possibly implicit) object
5193-
expression\iref{expr.ref}. In this case, the class of the object expression shall be
5193+
\grammarterm{nested-name-specifier} shall designate \tcode{C} or a class derived from
5194+
\tcode{C}.
5195+
Otherwise, if the access involves a (possibly implicit)
5196+
object expression\iref{expr.prim.id.general,expr.ref},
5197+
the class of the object expression shall be
51945198
\tcode{C} or a class derived from \tcode{C}.
51955199
\begin{example}
51965200
\begin{codeblock}

source/declarations.tex

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5092,32 +5092,38 @@
50925092
\end{itemize}
50935093

50945094
\pnum
5095-
A class type \tcode{T} is \defn{const-default-constructible} if
5095+
A type \cv{}~\tcode{T} is \defn{const-default-constructible} if
5096+
\begin{itemize}
5097+
\item
5098+
\tcode{T} is \tcode{std::meta::info};
5099+
\item
5100+
\tcode{T} is \tcode{std::nullptr_t};
5101+
\item
50965102
default-initialization of \tcode{T} would invoke
5097-
a user-provided constructor of \tcode{T} (not inherited from a base class)
5098-
or if
5103+
a user-provided constructor of \tcode{T} (not inherited from a base class);
5104+
\item
5105+
\tcode{T} is a class type where
50995106
\begin{itemize}
51005107
\item
5101-
each direct non-variant non-static data member \tcode{M} of \tcode{T}
5102-
has a default member initializer
5103-
or, if \tcode{M} is of class type \tcode{X} (or array thereof),
5104-
\tcode{X} is const-default-constructible,
5108+
each direct non-variant non-static data member of \tcode{T}
5109+
has a default member initializer or
5110+
is of const-default-constructible type,
51055111
\item
51065112
if \tcode{T} is a union with at least one non-static data member,
51075113
exactly one variant member has a default member initializer,
51085114
\item
51095115
if \tcode{T} is not a union,
5110-
for each anonymous union member with at least one non-static data member (if any),
5111-
exactly one non-static data member has a default member initializer, and
5116+
the type of each anonymous union member is const-default-constructible, and
5117+
\item
5118+
each potentially constructed base class of \tcode{T} is const-default-constructible; or
5119+
\end{itemize}
51125120
\item
5113-
each potentially constructed base class of \tcode{T} is const-default-constructible.
5121+
\tcode{T} is an array of const-default-constructible type.
51145122
\end{itemize}
51155123

51165124
If a program calls for the default-initialization of an object of a
51175125
const-qualified type \tcode{T},
5118-
\tcode{T} shall be \tcode{std::meta::\linebreak info}
5119-
or a const-default-constructible class type,
5120-
or array thereof.
5126+
\tcode{T} shall be a const-default-constructible type.
51215127

51225128
\pnum
51235129
To
@@ -9804,6 +9810,9 @@
98049810
the next statement shall be part of the same execution of
98059811
the substatement of the innermost enclosing iteration statement.
98069812
The program is ill-formed if there is no such statement.
9813+
The innermost enclosing \tcode{switch} statement
9814+
of a fallthrough statement $S$ shall be contained in
9815+
the innermost enclosing expansion statement\iref{stmt.expand} of $S$, if any.
98079816

98089817
\pnum
98099818
\recommended
@@ -10209,14 +10218,15 @@
1020910218
\indextext{attribute!annotations}
1021010219

1021110220
\pnum
10212-
An annotation may be applied to any declaration of a
10221+
An annotation may be applied
10222+
to a \grammarterm{base-specifier} or
10223+
to any declaration of a
1021310224
type,
1021410225
type alias,
1021510226
variable,
1021610227
function,
1021710228
namespace,
10218-
enumerator,
10219-
\grammarterm{base-specifier}, or
10229+
enumerator, or
1022010230
non-static data member.
1022110231

1022210232
\pnum

0 commit comments

Comments
 (0)