Skip to content

Commit b88607d

Browse files
authored
Merge 2025-02 CWG Motion 1
P3638R0 Core Language Working Group "ready" Issues
2 parents a103bf3 + 29959f5 commit b88607d

File tree

5 files changed

+28
-23
lines changed

5 files changed

+28
-23
lines changed

source/basic.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6586,7 +6586,8 @@
65866586
\end{note}
65876587

65886588
\pnum
6589-
Two accesses to the same object of type \tcode{\keyword{volatile} std::sig_atomic_t} do not
6589+
Two accesses to the same non-bit-field object
6590+
of type \tcode{\keyword{volatile} std::sig_atomic_t} do not
65906591
result in a data race if both occur in the same thread, even if one or more
65916592
occurs in a signal handler. For each signal handler invocation, evaluations
65926593
performed by the thread invoking a signal handler can be divided into two

source/classes.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6551,7 +6551,8 @@
65516551
\tcode{static_cast<R>(a <=> b)}.
65526552

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

source/declarations.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9563,6 +9563,7 @@
95639563
\recommended
95649564
Appearance of a nodiscard call as
95659565
a potentially-evaluated discarded-value expression\iref{expr.prop}
9566+
of non-void type
95669567
is discouraged unless explicitly cast to \keyword{void}.
95679568
Implementations should issue a warning in such cases.
95689569
The value of

source/expressions.tex

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,30 +1608,26 @@
16081608

16091609
\pnum
16101610
An \defnadj{implicitly movable}{entity} is
1611-
a variable of automatic storage duration
1611+
a variable with automatic storage duration
16121612
that is either a non-volatile object or
16131613
an rvalue reference to a non-volatile object type.
1614-
In the following contexts,
1615-
an \grammarterm{id-expression} is \defn{move-eligible}:
1614+
An \grammarterm{id-expression} is \defn{move-eligible} if
16161615
\begin{itemize}
16171616
\item
1618-
If the \grammarterm{id-expression} (possibly parenthesized)
1619-
is the operand of a \tcode{return}\iref{stmt.return} or
1620-
\keyword{co_return}\iref{stmt.return.coroutine} statement,
1621-
and names an implicitly movable entity declared in the body
1622-
or \grammarterm{parameter-declaration-clause} of the innermost enclosing
1623-
function or \grammarterm{lambda-expression}, or
1624-
\item
1625-
if the \grammarterm{id-expression} (possibly parenthesized)
1626-
is the operand of a \grammarterm{throw-expression}\iref{expr.throw},
1627-
and names an implicitly movable entity
1628-
that belongs to a scope that does not contain the \grammarterm{compound-statement}
1629-
of the innermost
1630-
\grammarterm{lambda-expression},
1631-
\grammarterm{try-block}, or
1632-
\grammarterm{function-try-block} (if any)
1633-
whose \grammarterm{compound-statement} or \grammarterm{ctor-initializer}
1634-
contains the \grammarterm{throw-expression}.
1617+
it names an implicitly movable entity,
1618+
\item
1619+
it is the (possibly parenthesized)
1620+
operand of a \tcode{return}\iref{stmt.return} or
1621+
\keyword{co_return}\iref{stmt.return.coroutine} statement or
1622+
of a \grammarterm{throw-expression}\iref{expr.throw}, and
1623+
\item
1624+
each intervening scope between
1625+
the declaration of the entity and
1626+
the innermost enclosing scope of the \grammarterm{id-expression}
1627+
is a block scope and,
1628+
for a \grammarterm{throw-expression},
1629+
is not the block scope of
1630+
a \grammarterm{try-block} or \grammarterm{function-try-block}.
16351631
\end{itemize}
16361632

16371633
\rSec3[expr.prim.id.qual]{Qualified names}

source/modules.tex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,20 @@
312312
A redeclaration of an entity $X$
313313
is implicitly exported
314314
if $X$ was introduced by an exported declaration;
315-
otherwise it shall not be exported if it is attached to a named module.
315+
otherwise it shall not be exported unless it is a namespace.
316316
\begin{example}
317317
\begin{codeblock}
318318
export module M;
319319
struct S { int n; };
320320
typedef S S;
321321
export typedef S S; // OK, does not redeclare an entity
322322
export struct S; // error: exported declaration follows non-exported declaration
323+
namespace N { // external linkage, attached to global module, not exported
324+
void f();
325+
}
326+
namespace N { // OK, exported namespace redeclaring non-exported namespace
327+
export void g();
328+
}
323329
\end{codeblock}
324330
\end{example}
325331

0 commit comments

Comments
 (0)