Created on 2022-11-03.00:00:00 last changed 17 months ago
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
[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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-07-16 13:00:43 | admin | set | status: open -> c++23 |
2023-07-16 13:00:43 | admin | set | status: wp -> open |
2023-02-18 18:43:04 | admin | set | status: accepted -> wp |
2022-11-25 05:14:04 | admin | set | status: nb -> accepted |
2022-11-08 20:29:48 | admin | set | status: open -> nb |
2022-11-08 20:29:48 | admin | set | status: open -> open |
2022-11-08 20:29:48 | admin | set | status: open -> open |
2022-11-08 20:29:48 | admin | set | status: open -> open |
2022-11-08 14:15:22 | admin | set | status: nb -> open |
2022-11-08 14:15:22 | admin | set | status: nb -> nb |
2022-11-08 14:15:22 | admin | set | status: nb -> nb |
2022-11-08 14:15:22 | admin | set | messages: + msg6982 |
2022-11-03 00:00:00 | admin | create |