Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6331,7 +6331,13 @@
\opt{ctor-initializer} compound-statement\br
function-try-block\br
\terminal{=} \keyword{default} \terminal{;}\br
\terminal{=} \keyword{delete} \terminal{;}
deleted-function-body
\end{bnf}

\begin{bnf}
\nontermdef{deleted-function-body}\br
\terminal{=} \keyword{delete} \terminal{;}\br
\terminal{=} \keyword{delete} \terminal{(} unevaluated-string \terminal{)} \terminal{;}
\end{bnf}

Any informal reference to the body of a function should be interpreted as a reference to
Expand Down Expand Up @@ -6589,11 +6595,8 @@
\indextext{definition!function!deleted}%

\pnum
A \defnadj{deleted}{definition} of a function is
a function definition whose
\grammarterm{function-body}
is of the form
\tcode{= delete ;}
A \defnadj{deleted}{definition} of a function is a function definition
whose \grammarterm{function-body} is a \grammarterm{deleted-function-body}
or an explicitly-defaulted definition of the function where the function is
defined as deleted.
A \defnadj{deleted}{function} is
Expand All @@ -6603,6 +6606,12 @@
\pnum
A program that refers to a deleted function implicitly or explicitly, other
than to declare it, is ill-formed.

\recommended
The resulting diagnostic message should include
the text of the \grammarterm{unevaluated-string},
if one is supplied.

\begin{note}
This includes calling the function
implicitly or explicitly and forming a pointer or pointer-to-member to the
Expand All @@ -6611,6 +6620,9 @@
function selected by overload resolution is referenced. The implicit
odr-use\iref{term.odr.use} of a virtual function does not, by itself,
constitute a reference.
The \grammarterm{unevaluated-string}, if present,
can be used to explain the rationale for deletion and/or
to suggest an alternative.
\end{note}

\pnum
Expand Down
1 change: 1 addition & 0 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@
\defnxname{cpp_decltype_auto} & \tcode{201304L} \\ \rowsep
\defnxname{cpp_deduction_guides} & \tcode{201907L} \\ \rowsep
\defnxname{cpp_delegating_constructors} & \tcode{200604L} \\ \rowsep
\defnxname{cpp_deleted_function} & \tcode{202403L} \\ \rowsep
\defnxname{cpp_designated_initializers} & \tcode{201707L} \\ \rowsep
\defnxname{cpp_enumerator_attributes} & \tcode{201411L} \\ \rowsep
\defnxname{cpp_explicit_this_parameter} & \tcode{202110L} \\ \rowsep
Expand Down