Skip to content

Commit f41b535

Browse files
burblebeetkoeppe
authored andcommitted
CWG2761 Implicitly invoking the deleted destructor of an anonymous union member
1 parent 25dd302 commit f41b535

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

source/classes.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,8 @@
21172117
\tcode{X}
21182118
calls the destructors for
21192119
\tcode{X}'s
2120-
direct non-variant non-static data members, the destructors for
2120+
direct non-variant non-static data members other than anonymous unions,
2121+
the destructors for
21212122
\tcode{X}'s
21222123
non-virtual direct base classes and, if
21232124
\tcode{X}

source/declarations.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5097,6 +5097,7 @@
50975097

50985098
\pnum
50995099
The destructor for each element of class type
5100+
other than an anonymous union member
51005101
is potentially invoked\iref{class.dtor}
51015102
from the context where the aggregate initialization occurs.
51025103
\begin{note}

source/exceptions.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@
421421
\end{note}
422422
\indextext{subobject!initialized, known to be}%
423423
A subobject is \defn{known to be initialized}
424-
if its initialization is specified
424+
if it is not an anonymous union member and
425+
its initialization is specified
425426
\begin{itemize}
426427
\item in \ref{class.base.init} for initialization by constructor,
427428
\item in \ref{class.copy.ctor} for initialization by defaulted copy/move constructor,

0 commit comments

Comments
 (0)