Created on 2024-03-08.00:00:00 last changed 4 days ago
Proposed resolution (approved by CWG 2024-11-08):
Change in 11.6 [class.local] paragraph 3 as follows:
If class X is a local class, a nested class Y may be declared in class X and later defined in the definition of class X or be later defined in the same scope as the definition of class X.A class nested within a local class is a local class. A member of a local class X shall be declared only in the definition of X or, if the member is a nested class, in the nearest enclosing block scope of X.
CWG 2024-06-14
The implementation status quo is that no members of local classes other than nested classes can be defined at block scope.
[Accepted as a DR at the November, 2024 meeting.]
Subclause 11.6 [class.local] paragraph 3 establishes restrictions on the definition of classes nested within local classes, but it is unclear which restrictions exist for other members of local classes.
Possible resolution [SUPERSEDED]:
Change in 11.6 [class.local] paragraph 3 as follows:
If class X is a local class, a nested class Y may be declared in class X and later defined in the definition of class X or be later defined in the same scope as the definition of class X.A class nested within a local class is a local class. A member of a local class X shall be declared only in the definition of X or the nearest enclosing block scope of X.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-12-17 09:54:02 | admin | set | status: ready -> dr |
2024-11-19 11:51:56 | admin | set | status: tentatively ready -> ready |
2024-11-09 00:21:39 | admin | set | messages: + msg7881 |
2024-11-09 00:21:39 | admin | set | status: review -> tentatively ready |
2024-06-14 20:31:51 | admin | set | messages: + msg7737 |
2024-06-14 20:31:51 | admin | set | status: open -> review |
2024-03-08 00:00:00 | admin | create |