Skip to content

[2025-02 CWG 1] P3638R0 Core Language Working Group "ready" Issues #7647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6586,7 +6586,8 @@
\end{note}

\pnum
Two accesses to the same object of type \tcode{\keyword{volatile} std::sig_atomic_t} do not
Two accesses to the same non-bit-field object
of type \tcode{\keyword{volatile} std::sig_atomic_t} do not
result in a data race if both occur in the same thread, even if one or more
occurs in a signal handler. For each signal handler invocation, evaluations
performed by the thread invoking a signal handler can be divided into two
Expand Down
3 changes: 2 additions & 1 deletion source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6551,7 +6551,8 @@
\tcode{static_cast<R>(a <=> b)}.

\item
Otherwise, if overload resolution for \tcode{a <=> b} is performed and
Otherwise, if \tcode{a <=> b} is usable or
overload resolution for \tcode{a <=> b} is performed and
finds at least one viable candidate,
the synthesized three-way comparison is not defined.

Expand Down
1 change: 1 addition & 0 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9563,6 +9563,7 @@
\recommended
Appearance of a nodiscard call as
a potentially-evaluated discarded-value expression\iref{expr.prop}
of non-void type
is discouraged unless explicitly cast to \keyword{void}.
Implementations should issue a warning in such cases.
The value of
Expand Down
36 changes: 16 additions & 20 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1608,30 +1608,26 @@

\pnum
An \defnadj{implicitly movable}{entity} is
a variable of automatic storage duration
a variable with automatic storage duration
that is either a non-volatile object or
an rvalue reference to a non-volatile object type.
In the following contexts,
an \grammarterm{id-expression} is \defn{move-eligible}:
An \grammarterm{id-expression} is \defn{move-eligible} if
\begin{itemize}
\item
If the \grammarterm{id-expression} (possibly parenthesized)
is the operand of a \tcode{return}\iref{stmt.return} or
\keyword{co_return}\iref{stmt.return.coroutine} statement,
and names an implicitly movable entity declared in the body
or \grammarterm{parameter-declaration-clause} of the innermost enclosing
function or \grammarterm{lambda-expression}, or
\item
if the \grammarterm{id-expression} (possibly parenthesized)
is the operand of a \grammarterm{throw-expression}\iref{expr.throw},
and names an implicitly movable entity
that belongs to a scope that does not contain the \grammarterm{compound-statement}
of the innermost
\grammarterm{lambda-expression},
\grammarterm{try-block}, or
\grammarterm{function-try-block} (if any)
whose \grammarterm{compound-statement} or \grammarterm{ctor-initializer}
contains the \grammarterm{throw-expression}.
it names an implicitly movable entity,
\item
it is the (possibly parenthesized)
operand of a \tcode{return}\iref{stmt.return} or
\keyword{co_return}\iref{stmt.return.coroutine} statement or
of a \grammarterm{throw-expression}\iref{expr.throw}, and
\item
each intervening scope between
the declaration of the entity and
the innermost enclosing scope of the \grammarterm{id-expression}
is a block scope and,
for a \grammarterm{throw-expression},
is not the block scope of
a \grammarterm{try-block} or \grammarterm{function-try-block}.
\end{itemize}

\rSec3[expr.prim.id.qual]{Qualified names}
Expand Down
8 changes: 7 additions & 1 deletion source/modules.tex
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,20 @@
A redeclaration of an entity $X$
is implicitly exported
if $X$ was introduced by an exported declaration;
otherwise it shall not be exported if it is attached to a named module.
otherwise it shall not be exported unless it is a namespace.
\begin{example}
\begin{codeblock}
export module M;
struct S { int n; };
typedef S S;
export typedef S S; // OK, does not redeclare an entity
export struct S; // error: exported declaration follows non-exported declaration
namespace N { // external linkage, attached to global module, not exported
void f();
}
namespace N { // OK, exported namespace redeclaring non-exported namespace
export void g();
}
\end{codeblock}
\end{example}

Expand Down