Skip to content

Commit 3ba1513

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 da79478 commit 3ba1513

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
@@ -2142,6 +2142,22 @@
21422142
of a prospective destructor declaration (if any)
21432143
shall be \tcode{friend}, \tcode{inline}, or \tcode{virtual}.
21442144

2145+
\pnum
2146+
\indextext{generated destructor|see{destructor, default}}%
2147+
\indextext{destructor!default}%
2148+
If a class has no user-declared
2149+
prospective destructor,
2150+
a prospective destructor is implicitly
2151+
declared as defaulted\iref{dcl.fct.def}.
2152+
An implicitly-declared prospective destructor is an
2153+
inline public member of its class.
2154+
2155+
\pnum
2156+
An implicitly-declared prospective destructor for a class \tcode{X} will have the form
2157+
\begin{codeblock}
2158+
~X()
2159+
\end{codeblock}
2160+
21452161
\pnum
21462162
At the end of the definition of a class,
21472163
overload resolution is performed
@@ -2182,22 +2198,6 @@
21822198
has the same exception specification as if it had been implicitly declared\iref{except.spec}.
21832199
\end{note}
21842200

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

0 commit comments

Comments
 (0)