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

2026-06-27


3206. Scattered definition of "local class"

Section: 11.6  [class.local]     Status: open     Submitter: CWG     Date: 2026-06-26

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

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