Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ec9ec02
CWG2917 Disallow multiple friend-type-specifiers for a friend template
eisenwave Nov 9, 2025
9f16b16
[temp.pre] Add error explanation to comment
eisenwave Nov 9, 2025
e057038
CWG2923 Note about infinite loops and execution steps
eisenwave Nov 9, 2025
94c287c
CWG3005 Function parameters should never be name-independent
eisenwave Nov 9, 2025
5c82198
CWG3043 Lifetime extension for temporaries in expansion statements
eisenwave Nov 9, 2025
7748322
CWG3044 Iterating expansion statements woes
eisenwave Nov 9, 2025
305f52e
CWG3045 Regularizing environment interactions of expansion statement
eisenwave Nov 9, 2025
228ffe2
CWG3048 Empty destructuring expansion statements
eisenwave Nov 9, 2025
a970669
CWG3053 Allowing #undef likely
eisenwave Nov 9, 2025
47f191a
CWG3061 Trailing comma in an expansion-init-list
eisenwave Nov 9, 2025
9730b97
CWG3063 Lifetime extension of temporaries past function return
eisenwave Nov 9, 2025
5e4d6ea
CWG3074 Redundant ill-formedness for module macros
eisenwave Nov 9, 2025
8cf344e
CWG3082 Allow for call-compatible function types in reinterpret_cast
eisenwave Nov 9, 2025
f10a470
CWG3084 compound-statements inside iteration-statements
eisenwave Nov 9, 2025
9fa1559
CWG3089 const-default-constructible improperly handles std::meta::info
eisenwave Nov 9, 2025
580a8dd
CWG3092 base-specifiers are not "declared"
eisenwave Nov 9, 2025
c6b803d
CWG3093 Missing integration of direct base class relationships
eisenwave Nov 9, 2025
1ced1bf
CWG3094 Rework phases for string literal concatenation and token form…
eisenwave Nov 9, 2025
7befab1
CWG3095 Type-dependent packs that are not structured binding packs
eisenwave Nov 9, 2025
19d4a78
CWG3098 Remove redundancy "names or designates"
eisenwave Nov 9, 2025
b5ab660
CWG3099 Instantiation of type aliases from alias templates is unspeci…
eisenwave Nov 9, 2025
ab819c8
CWG3101 Types "compounded" from other types
eisenwave Nov 9, 2025
0aa1b4c
CWG3108 Reflection on type aliases
eisenwave Nov 9, 2025
86bf74a
CWG3109 Access checking when designating a protected member by a splice
eisenwave Nov 9, 2025
8da1676
CWG3110 Constexpr allocation for literal types
eisenwave Nov 9, 2025
28f9625
CWG3113 When is an expansion-init-list type-dependent?
eisenwave Nov 9, 2025
eb06999
CWG3114 Indirect base classes for class member access with direct bas…
eisenwave Nov 9, 2025
81d0390
CWG3115 Function parameters of consteval-only type
eisenwave Nov 9, 2025
4feb958
CWG3117 Overriding by a consteval virtual function
eisenwave Nov 9, 2025
f733978
CWG3118 Mangling reflections of annotations is infeasible
eisenwave Nov 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 52 additions & 20 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@
an array operand, the set contains the potential results of that operand.
\item If $E$ is a class member access
expression\iref{expr.ref} of the form
$E_1$ \tcode{.} \opt{\keyword{template}} $E_2$
naming a non-static data member,
$E_1$ \tcode{.} \opt{\keyword{template}} $E_2$,
where $E_2$ designates a a non-static data member or
a direct base class relationship,
the set contains the potential results of $E_1$.
\item If $E$ is a class member access expression
naming a static data member,
Expand Down Expand Up @@ -1136,7 +1137,7 @@
if its name is \tcode{_} (\unicode{005f}{low line}) and it declares
\begin{itemize}
\item
a variable with automatic storage duration,
a variable, other than a function parameter, with automatic storage duration,
\item
a structured binding
%FIXME: "and" is strange below; maybe reword to something like:
Expand Down Expand Up @@ -1439,8 +1440,8 @@
\grammarterm{compound-statement} of a \grammarterm{lambda-expression},
\grammarterm{function-body}, or \grammarterm{function-try-block},
\item
substatement of a selection or iteration statement
that is not itself a selection or iteration statement, or
substatement of a selection, iteration, or expansion statement
that is not itself a selection, iteration, or expansion statement, or
\item
\grammarterm{handler} of a \grammarterm{function-try-block}
\end{itemize}
Expand Down Expand Up @@ -3271,6 +3272,8 @@
\item
an entity, value, or object that is TU-local,
\item
an annotation\iref{dcl.attr.annotation},
\item
a direct base class relationship $(D, B)$\iref{class.derived.general}
for which either $D$ or $B$ is TU-local, or
\item
Expand Down Expand Up @@ -3663,6 +3666,24 @@
the address of an unspecified byte of storage
occupied by the complete object of that subobject.

\pnum
The \defnx{constituent values}{constituent value} of an object $o$ are
\begin{itemize}
\item
if $o$ has scalar type, the value of $o$;
\item
otherwise, the constituent values of any direct subobjects of $o$
other than inactive union members.
\end{itemize}
The \defnx{constituent references}{constituent reference} of an object $o$ are
\begin{itemize}
\item
any direct members of $o$ that have reference type, and
\item
the constituent references of any direct subobjects of $o$
other than inactive union members.
\end{itemize}

\pnum
Some operations are described as
\defnx{implicitly creating objects}{object!implicit creation}
Expand Down Expand Up @@ -4900,24 +4921,32 @@
\pnum
The fourth context is when a temporary object
is created in the \grammarterm{for-range-initializer} of
either a range-based \keyword{for} statement
or an enumerating expansion statement\iref{stmt.expand}.
a range-based \keyword{for} statement.
If such a temporary object would otherwise be destroyed
at the end of the \grammarterm{for-range-initializer} full-expression,
the object persists for the lifetime of the reference
initialized by the \grammarterm{for-range-initializer}.

\pnum
The fifth context is when a temporary object is created
The fifth context is when a temporary object is created in an element $E$
of the \grammarterm{expansion-init-list}
of an enumerating expansion statement\iref{stmt.expand}.
If such a temporary object would otherwise be destroyed
at the end of the full-expression of $E$,
the object persists for the lifetime of the \grammarterm{for-range-declaration}
initialized from $E$.

\pnum
The sixth context is when a temporary object is created
in the \grammarterm{expansion-initializer}
of an iterating or destructuring expansion statement.
of a destructuring expansion statement.
If such a temporary object would otherwise be destroyed
at the end of that \grammarterm{expansion-initializer},
the object persists for the lifetime of the reference
initialized by the \grammarterm{expansion-initializer}, if any.

\pnum
The sixth context is when a temporary object
The seventh context is when a temporary object
is created in a structured binding declaration\iref{dcl.struct.bind}.
Any temporary objects introduced by
the \grammarterm{initializer}{s} for the variables
Expand Down Expand Up @@ -5295,9 +5324,17 @@
layout-compatible standard-layout class types\iref{class.mem}.

\pnum
A type is \defn{consteval-only} if it is either
\tcode{std::meta::info} or
a type compounded from a consteval-only type\iref{basic.compound}.
A type is \defn{consteval-only} if it is
\begin{itemize}
\item \tcode{std::meta::info},
\item \cv{}~\tcode{T}, where \tcode{T} is a consteval-only type,
\item a pointer or reference to a consteval-only type,
\item an array of consteval-only type,
\item a function type having a return type or any parameter type that is consteval-only,
\item a class type with any non-static data member having consteval-only type, or
\item a type ``pointer to member of class \tcode{C} of type \tcode{T}'',
where at least one of \tcode{C} or \tcode{T} is a consteval-only type.
\end{itemize}
Every object of consteval-only type shall be
\begin{itemize}
\item
Expand All @@ -5308,6 +5345,8 @@
an object whose lifetime begins and ends
during the evaluation of a core constant expression.
\end{itemize}
Every function of consteval-only type shall be
an immediate function\iref{expr.const}.

\rSec2[basic.fundamental]{Fundamental types}

Expand Down Expand Up @@ -7012,13 +7051,6 @@
observable behavior of the abstract machine.
\end{example}

\pnum
\begin{note}
Because of this and the preceding requirement regarding what threads of execution
have to perform eventually, it follows that no thread of execution can execute
forever without an execution step occurring.
\end{note}

\pnum
A thread of execution \defnx{makes progress}{make progress!thread}
when an execution step occurs or a
Expand Down
16 changes: 10 additions & 6 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4185,8 +4185,9 @@
\indextext{function!virtual|)}

\pnum
A \keyword{consteval} virtual function shall not override
a virtual function that is not \keyword{consteval}.
A class with a \keyword{consteval} virtual function that overrides
a virtual function that is not \keyword{consteval}
shall have consteval-only type\iref{basic.types.general}.
A \keyword{consteval} virtual function shall not be overridden by
a virtual function that is not \keyword{consteval}.

Expand Down Expand Up @@ -5177,7 +5178,8 @@
\pnum
An additional access check beyond those described earlier in \ref{class.access}
is applied when a non-static data member or non-static member function is a
protected member of its designating class\iref{class.access.base}.
protected member of its designating class\iref{class.access.base}
and is not designated by a \grammarterm{splice-expression}.
\begin{footnote}
This
additional check does not apply to other members,
Expand All @@ -5186,9 +5188,11 @@
As described earlier, access to a protected member is granted because the
reference occurs in a friend or direct member of some class \tcode{C}. If the access is
to form a pointer to member\iref{expr.unary.op}, the
\grammarterm{nested-name-specifier} shall denote \tcode{C} or a class derived from
\tcode{C}. All other accesses involve a (possibly implicit) object
expression\iref{expr.ref}. In this case, the class of the object expression shall be
\grammarterm{nested-name-specifier} shall designate \tcode{C} or a class derived from
\tcode{C}.
Otherwise, if the access involves a (possibly implicit)
object expression\iref{expr.prim.id.general,expr.ref},
the class of the object expression shall be
\tcode{C} or a class derived from \tcode{C}.
\begin{example}
\begin{codeblock}
Expand Down
42 changes: 26 additions & 16 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5094,32 +5094,38 @@
\end{itemize}

\pnum
A class type \tcode{T} is \defn{const-default-constructible} if
A type \cv{}~\tcode{T} is \defn{const-default-constructible} if
\begin{itemize}
\item
\tcode{T} is \tcode{std::meta::info};
\item
\tcode{T} is \tcode{std::nullptr_t};
\item
default-initialization of \tcode{T} would invoke
a user-provided constructor of \tcode{T} (not inherited from a base class)
or if
a user-provided constructor of \tcode{T} (not inherited from a base class);
\item
\tcode{T} is a class type where
\begin{itemize}
\item
each direct non-variant non-static data member \tcode{M} of \tcode{T}
has a default member initializer
or, if \tcode{M} is of class type \tcode{X} (or array thereof),
\tcode{X} is const-default-constructible,
each direct non-variant non-static data member of \tcode{T}
has a default member initializer or
is of const-default-constructible type,
\item
if \tcode{T} is a union with at least one non-static data member,
exactly one variant member has a default member initializer,
\item
if \tcode{T} is not a union,
for each anonymous union member with at least one non-static data member (if any),
exactly one non-static data member has a default member initializer, and
the type of each anonymous union member is const-default-constructible, and
\item
each potentially constructed base class of \tcode{T} is const-default-constructible; or
\end{itemize}
\item
each potentially constructed base class of \tcode{T} is const-default-constructible.
\tcode{T} is an array of const-default-constructible type.
\end{itemize}

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

\pnum
To
Expand Down Expand Up @@ -9791,6 +9797,9 @@
the next statement shall be part of the same execution of
the substatement of the innermost enclosing iteration statement.
The program is ill-formed if there is no such statement.
The innermost enclosing \tcode{switch} statement
of a fallthrough statement $S$ shall be contained in
the innermost enclosing expansion statement\iref{stmt.expand} of $S$, if any.

\pnum
\recommended
Expand Down Expand Up @@ -10196,14 +10205,15 @@
\indextext{attribute!annotations}

\pnum
An annotation may be applied to any declaration of a
An annotation may be applied
to a \grammarterm{base-specifier} or
to any declaration of a
type,
type alias,
variable,
function,
namespace,
enumerator,
\grammarterm{base-specifier}, or
enumerator, or
non-static data member.

\pnum
Expand Down
Loading
Loading