Skip to content

Commit 25dd302

Browse files
burblebeetkoeppe
authored andcommitted
CWG2760 Defaulted constructor that is an immediate function
1 parent 218cee1 commit 25dd302

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

source/declarations.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6234,7 +6234,12 @@
62346234
\end{bnf}
62356235

62366236
Any informal reference to the body of a function should be interpreted as a reference to
6237-
the non-terminal \grammarterm{function-body}.
6237+
the non-terminal \grammarterm{function-body},
6238+
including, for a constructor,
6239+
default member initializers or default initialization
6240+
used to initialize
6241+
a base or member subobject in the absence of
6242+
a \grammarterm{mem-initializer-id}\iref{class.base.init}.
62386243
The optional \grammarterm{attribute-specifier-seq} in a \grammarterm{function-definition}
62396244
appertains to the function.
62406245
A \grammarterm{virt-specifier-seq} can be part of a \grammarterm{function-definition}

source/expressions.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7983,6 +7983,11 @@
79837983
whose function body contains an immediate-escalating expression \tcode{\placeholder{E}}
79847984
such that \tcode{\placeholder{E}}'s innermost enclosing non-block scope
79857985
is \tcode{\placeholder{F}}'s function parameter scope.
7986+
\begin{tailnote}
7987+
Default member initializers used to initialize
7988+
a base or member subobject\iref{class.base.init}
7989+
are considered to be part of the function body\iref{dcl.fct.def.general}.
7990+
\end{tailnote}
79867991
\end{itemize}
79877992
\begin{example}
79887993
\begin{codeblock}

0 commit comments

Comments
 (0)