Skip to content

Commit ef668df

Browse files
burblebeetkoeppe
authored andcommitted
CWG2646 Defaulted special member functions
Fixes NB US 052 (C++23 CD).
1 parent 4631d28 commit ef668df

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

source/declarations.tex

+7-9
Original file line numberDiff line numberDiff line change
@@ -6200,35 +6200,33 @@
62006200

62016201
\pnum
62026202
An explicitly defaulted special member function $\tcode{F}_1$
6203-
with type $\tcode{T}_1$
62046203
is allowed to differ from
62056204
the corresponding special member function $\tcode{F}_2$
6206-
with type $\tcode{T}_2$
62076205
that would have been implicitly declared, as follows:
62086206
\begin{itemize}
62096207
\item
6210-
$\tcode{T}_1$ and $\tcode{T}_2$ may have differing \grammarterm{ref-qualifier}{s};
6208+
$\tcode{F}_1$ and $\tcode{F}_2$ may have differing \grammarterm{ref-qualifier}{s};
62116209
\item
62126210
if $\tcode{F}_2$ has an implicit object parameter of
62136211
type ``reference to \tcode{C}'',
62146212
$\tcode{F}_1$ may be an explicit object member function whose
62156213
explicit object parameter is of type ``reference to \tcode{C}'',
6216-
in which case $\tcode{T}_1$ would differ from $\tcode{T}_2$
6217-
in that $\tcode{T}_1$ has an additional parameter;
6214+
in which case the type of $\tcode{F}_1$ would differ from the type of $\tcode{F}_2$
6215+
in that the type of $\tcode{F}_1$ has an additional parameter;
62186216
\item
6219-
$\tcode{T}_1$ and $\tcode{T}_2$ may have differing exception specifications; and
6217+
$\tcode{F}_1$ and $\tcode{F}_2$ may have differing exception specifications; and
62206218
\item
62216219
if $\tcode{F}_2$ has a non-object parameter of type \tcode{const C\&},
62226220
the corresponding non-object parameter of $\tcode{F}_1$ may be of
62236221
type \tcode{C\&}.
62246222
\end{itemize}
6225-
If $\tcode{T}_1$ differs from $\tcode{T}_2$ in a way
6223+
If the type of $\tcode{F}_1$ differs from the type of $\tcode{F}_2$ in a way
62266224
other than as allowed by the preceding rules, then:
62276225
\begin{itemize}
62286226
\item
62296227
if $\tcode{F}_1$ is an assignment operator, and
6230-
the return type of $\tcode{T}_1$ differs from
6231-
the return type of $\tcode{T}_2$ or
6228+
the return type of $\tcode{F}_1$ differs from
6229+
the return type of $\tcode{F}_2$ or
62326230
$\tcode{F}_1${'s} non-object parameter type is not a reference,
62336231
the program is ill-formed;
62346232
\item

0 commit comments

Comments
 (0)