|
6249 | 6249 | \opt{ctor-initializer} compound-statement\br
|
6250 | 6250 | function-try-block\br
|
6251 | 6251 | \terminal{=} \keyword{default} \terminal{;}\br
|
6252 |
| - \terminal{=} \keyword{delete} \terminal{;} |
| 6252 | + deleted-function-body |
| 6253 | +\end{bnf} |
| 6254 | + |
| 6255 | +\begin{bnf} |
| 6256 | +\nontermdef{deleted-function-body}\br |
| 6257 | + \terminal{=} \keyword{delete} \terminal{;}\br |
| 6258 | + \terminal{=} \keyword{delete} \terminal{(} unevaluated-string \terminal{)} \terminal{;} |
6253 | 6259 | \end{bnf}
|
6254 | 6260 |
|
6255 | 6261 | Any informal reference to the body of a function should be interpreted as a reference to
|
|
6502 | 6508 | \indextext{definition!function!deleted}%
|
6503 | 6509 |
|
6504 | 6510 | \pnum
|
6505 |
| -A \defnadj{deleted}{definition} of a function is |
6506 |
| -a function definition whose |
6507 |
| -\grammarterm{function-body} |
6508 |
| -is of the form |
6509 |
| -\tcode{= delete ;} |
| 6511 | +A \defnadj{deleted}{definition} of a function is a function definition |
| 6512 | +whose \grammarterm{function-body} is a \grammarterm{deleted-function-body} |
6510 | 6513 | or an explicitly-defaulted definition of the function where the function is
|
6511 | 6514 | defined as deleted.
|
6512 | 6515 | A \defnadj{deleted}{function} is
|
|
6516 | 6519 | \pnum
|
6517 | 6520 | A program that refers to a deleted function implicitly or explicitly, other
|
6518 | 6521 | than to declare it, is ill-formed.
|
| 6522 | + |
| 6523 | +\recommended |
| 6524 | +The resulting diagnostic message should include |
| 6525 | +the text of the \grammarterm{unevaluated-string}, |
| 6526 | +if one is supplied. |
| 6527 | + |
6519 | 6528 | \begin{note}
|
6520 | 6529 | This includes calling the function
|
6521 | 6530 | implicitly or explicitly and forming a pointer or pointer-to-member to the
|
|
6524 | 6533 | function selected by overload resolution is referenced. The implicit
|
6525 | 6534 | odr-use\iref{term.odr.use} of a virtual function does not, by itself,
|
6526 | 6535 | constitute a reference.
|
| 6536 | +The \grammarterm{unevaluated-string}, if present, |
| 6537 | +can be used to explain the rationale for deletion and/or |
| 6538 | +to suggest an alternative. |
6527 | 6539 | \end{note}
|
6528 | 6540 |
|
6529 | 6541 | \pnum
|
|
0 commit comments