Skip to content

Commit 94a72b5

Browse files
committed
[class.dtor] Reorder the introduction of an implicit prospective
destructor to before we describe the overload resolution to pick the actual destructor.
1 parent 98c2c56 commit 94a72b5

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

source/classes.tex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,22 @@
21452145
of a prospective destructor declaration (if any)
21462146
shall be \tcode{friend}, \tcode{inline}, or \tcode{virtual}.
21472147

2148+
\pnum
2149+
\indextext{generated destructor|see{destructor, default}}%
2150+
\indextext{destructor!default}%
2151+
If a class has no user-declared
2152+
prospective destructor,
2153+
a prospective destructor is implicitly
2154+
declared as defaulted\iref{dcl.fct.def}.
2155+
An implicitly-declared prospective destructor is an
2156+
inline public member of its class.
2157+
2158+
\pnum
2159+
An implicitly-declared prospective destructor for a class \tcode{X} will have the form
2160+
\begin{codeblock}
2161+
~X()
2162+
\end{codeblock}
2163+
21482164
\pnum
21492165
At the end of the definition of a class,
21502166
overload resolution is performed
@@ -2185,22 +2201,6 @@
21852201
has the same exception specification as if it had been implicitly declared\iref{except.spec}.
21862202
\end{note}
21872203

2188-
\pnum
2189-
\indextext{generated destructor|see{destructor, default}}%
2190-
\indextext{destructor!default}%
2191-
If a class has no user-declared
2192-
prospective destructor,
2193-
a prospective destructor is implicitly
2194-
declared as defaulted\iref{dcl.fct.def}.
2195-
An implicitly-declared prospective destructor is an
2196-
inline public member of its class.
2197-
2198-
\pnum
2199-
An implicitly-declared prospective destructor for a class \tcode{X} will have the form
2200-
\begin{codeblock}
2201-
~X()
2202-
\end{codeblock}
2203-
22042204
\pnum
22052205
A defaulted destructor for a class
22062206
\tcode{X} is defined as deleted if:

0 commit comments

Comments
 (0)