Skip to content

Commit e326276

Browse files
burblebeetkoeppe
authored andcommitted
CWG2658 Trivial copying of unions in core constant expressions
1 parent 4539636 commit e326276

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/expressions.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7616,6 +7616,15 @@
76167616
to storage allocated with \tcode{std::allocator<T>} or
76177617
to an object whose lifetime began within the evaluation of $E$.
76187618

7619+
\pnum
7620+
For the purposes of determining whether $E$ is a core constant expression,
7621+
the evaluation of a call to
7622+
a trivial copy/move constructor or copy/move assignment operator of a union
7623+
is considered to copy/move the active member of the union, if any.
7624+
\begin{note}
7625+
The copy/move of the active member is trivial.
7626+
\end{note}
7627+
76197628
\pnum
76207629
During the evaluation of an expression $E$ as a core constant expression,
76217630
all \grammarterm{id-expression}s and uses of \tcode{*\keyword{this}}

0 commit comments

Comments
 (0)