This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2852. Complete-class contexts and class-scope lambdas

Section: 11.4.1  [class.mem.general]     Status: open     Submitter: Richard Smith     Date: 2023-10-25

(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.

Suggested resolution:

A complete-class context of a class (template) or class template C is a 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]