|
6211 | 6211 | \end{itemize}
|
6212 | 6212 |
|
6213 | 6213 | \pnum
|
6214 |
| -The type \tcode{T}$_1$ of an explicitly defaulted special member function \tcode{F} |
6215 |
| -is allowed to differ from the type \tcode{T}$_2$ it would have had |
6216 |
| -if it were implicitly declared, as follows: |
| 6214 | +An explicitly defaulted special member function $\tcode{F}_1$ |
| 6215 | +with type $\tcode{T}_1$ |
| 6216 | +is allowed to differ from |
| 6217 | +the corresponding special member function $\tcode{F}_2$ |
| 6218 | +with type $\tcode{T}_2$ |
| 6219 | +that would have been implicitly declared, as follows: |
6217 | 6220 | \begin{itemize}
|
6218 | 6221 | \item
|
6219 |
| - \tcode{T}$_1$ and \tcode{T}$_2$ may have differing \grammarterm{ref-qualifier}{s}; |
| 6222 | + $\tcode{T}_1$ and $\tcode{T}_2$ may have differing \grammarterm{ref-qualifier}{s}; |
6220 | 6223 | \item
|
6221 |
| - \tcode{T}$_1$ and \tcode{T}$_2$ may have differing exception specifications; and |
| 6224 | + if $\tcode{F}_2$ has an implicit object parameter of |
| 6225 | + type ``reference to \tcode{C}'', |
| 6226 | + $\tcode{F}_1$ may be an explicit object member function whose |
| 6227 | + explicit object parameter is of type ``reference to \tcode{C}''; |
6222 | 6228 | \item
|
6223 |
| - if \tcode{T}$_2$ has a parameter of type \tcode{const C\&}, |
6224 |
| - the corresponding parameter of \tcode{T}$_1$ may be of type \tcode{C\&}. |
| 6229 | + $\tcode{T}_1$ and $\tcode{T}_2$ may have differing exception specifications; and |
| 6230 | +\item |
| 6231 | + if $\tcode{F}_2$ has a non-object parameter of type \tcode{const C\&}, |
| 6232 | + the corresponding non-object parameter of $\tcode{F}_1$ may be of |
| 6233 | + type \tcode{C\&}. |
6225 | 6234 | \end{itemize}
|
6226 |
| -If \tcode{T}$_1$ differs from \tcode{T}$_2$ in any other way, then: |
| 6235 | +If $\tcode{T}_1$ differs from $\tcode{T}_2$ in a way |
| 6236 | +other than as allowed by the preceding rules, then: |
6227 | 6237 | \begin{itemize}
|
6228 | 6238 | \item
|
6229 |
| - if \tcode{F} is an assignment operator, and |
6230 |
| - the return type of \tcode{T}$_1$ differs from |
6231 |
| - the return type of \tcode{T}$_2$ or |
6232 |
| - \tcode{T}$_1${'s} parameter type is not a reference, |
| 6239 | + if $\tcode{F}_1$ is an assignment operator, and |
| 6240 | + the return type of $\tcode{T}_1$ differs from |
| 6241 | + the return type of $\tcode{T}_2$ or |
| 6242 | + $\tcode{F}_1${'s} non-object parameter type is not a reference, |
6233 | 6243 | the program is ill-formed;
|
6234 | 6244 | \item
|
6235 |
| - otherwise, if \tcode{F} is explicitly defaulted on its first declaration, |
| 6245 | + otherwise, if $\tcode{F}_1$ is explicitly defaulted on its first declaration, |
6236 | 6246 | it is defined as deleted;
|
6237 | 6247 | \item
|
6238 | 6248 | otherwise, the program is ill-formed.
|
|
0 commit comments