This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Accepted at the November, 2022 meeting.]
The syntax and semantics appear to allow:
struct S { void f(this const S& = S{}); };This is probably no more than an oddity, but perhaps it should be prevented.
Proposed resolution (approved by CWG 2022-11-08):
Change in 9.3.4.6 [dcl.fct] paragraph 3 as follows:
parameter-declaration: attribute-specifier-seqopt thisopt decl-specifier-seq declarator attribute-specifier-seqoptthisoptdecl-specifier-seq declarator = initializer-clause attribute-specifier-seqopt thisopt decl-specifier-seq abstract-declaratoropt attribute-specifier-seqoptthisoptdecl-specifier-seq abstract-declaratoropt = initializer-clause