Title
Scattered definition of "local class"
Status
open
Section
11.6 [class.local]
Submitter
CWG

Created on 2026-06-26.00:00:00 last changed 5 days ago

Messages

Date: 2026-06-27.08:00:12

Possible resolution:

  1. Change in 11.6 [class.local] paragraph 1 as follows:

    A class can be declared within a function definition; such a class is called a local class. A class is a local class if
    • its declaration inhabits a block scope or
    • it is a nested class of a local class.
    [Note 1: A declaration in a local class cannot odr-use (6.3 [basic.def.odr]) a local entity from an enclosing scope. —end note]
  2. Change in 11.6 [class.local] paragraph 3 as follows:

    A class nested within a local class is a local class. ...
Date: 2026-06-26.00:00:00

In 11.6 [class.local], the definition of local class is colloquially scattered across several paragraphs.

History
Date User Action Args
2026-06-27 08:00:12adminsetmessages: + msg8618
2026-06-26 00:00:00admincreate