Title
Complete-class contexts and class-scope lambdas
Status
open
Section
11.4.1 [class.mem.general]
Submitter
Richard Smith

Created on 2023-10-25.00:00:00 last changed 2 months ago

Messages

Date: 2024-02-03.20:09:11

Suggested resolution:

A complete-class context of a class (template) or class template C is a
  • function body (9.5.1 [dcl.fct.def.general]),
  • default argument (9.3.4.7 [dcl.fct.default]) of a function declaration,
  • default template argument (13.2 [temp.param]),
  • noexcept-specifier (14.5 [except.spec]) of a function declaration, or
  • default member initializer, or
  • complete-class context of a nested class (11.4.12 [class.nest]) defined in C, recursively,
where the function, template, non-static data member, or nested class is declared by a member-declaration of C within the member-specification of the class or class template. [Note 4: A complete-class context of a nested class is also a complete-class context of any enclosing class, if the nested class is defined within the member-specification of the enclosing class. —end note]
Date: 2023-10-25.00:00:00

(From submission #449 and gcc bugzilla 111923.)

Subclause 11.5.1 [class.union.general] paragraph 7 is overly broad, presumably including noexcept-specifiers in declarations of non-static data members of function pointer type and default arguments in class-scope lambda expressions.

History
Date User Action Args
2024-02-03 20:09:11adminsetmessages: + msg7592
2023-10-25 00:00:00admincreate