This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

### 3815. Freestanding enumerators specification is lacking

Section: 16.3.3.6 [freestanding.entity], 33.5.2 [atomics.syn] Status: Resolved Submitter: Ben Craig Opened: 2022-11-06 Last modified: 2022-11-22

Priority: Not Prioritized

View all other issues in [freestanding.entity].

View all issues with Resolved status.

Discussion:

This is a partial resolution of GB-130 (33.5.2 [atomics.syn] `memory_order_acquire` etc should be freestanding).

It's not entirely clear whether the enumerators for the `std::memory_order` enum type are also freestanding, as those enumerators aren't shown in the synopsis, only in 33.5.4 [atomics.order].

Previous resolution [SUPERSEDED]:

> This wording is relative to N4917 assuming that LWG 3753 has been accepted (freestanding entity -> freestanding item).

> > [Drafting Note: Four mutually exclusive options are prepared, depicted below by Option A, Option B, Option C, and Option D, respectively.]

> Option A: Not a defect; no change required. Enumerators of freestanding enums are already part of freestanding with the current wording. 16.3.3.6 [freestanding.entity]#2 says the requirements of freestanding entities are the same as for hosted entities. The existence of the right enumerators (with the appropriate name scoping) are part of the requirements of the enum type.

> Option B: Not a defect; provide a clarifying note. Same rationale as above, but we make this stance clear in 16.3.3.6 [freestanding.entity]#2.

> 1. Modify 16.3.3.6 [freestanding.entity] (Which has been renamed to [freestanding.item]) as indicated:

>    > 16.3.3.6 Freestanding items [freestanding.item]

>    > […]

>    > -2- Unless otherwise specified, the requirements on freestanding items on a freestanding implementation are the same as the corresponding requirements in a hosted implementation.

>    > [Note: An enumerator places requirements on its enumeration. Freestanding item enumerations have the same enumerators on freestanding implementations and hosted implementations. — end note]

>    > […]

> Option C: Add additional normative wording that makes enumerators freestanding if their enumeration types are freestanding.

> 1. Modify 16.3.3.6 [freestanding.entity] (Which has been renamed to [freestanding.item]) as indicated:

>    > 16.3.3.6 Freestanding items [freestanding.item]

>    > -1- A freestanding item is an entity or macro definition that is present in a freestanding implementation and a hosted implementation.

>    > -?- An enumerator of a freestanding item enumeration is a freestanding item.

>    > […]

> Option D: This is Option C, plus it handles class types as well. If enumerators aren't automatically included with the existing wording, then arguably, neither are class type members.

> 1. Modify 16.3.3.6 [freestanding.entity] (Which has been renamed to [freestanding.item]) as indicated:

>    > 16.3.3.6 Freestanding items [freestanding.item]

>    > -1- A freestanding item is an entity or macro definition that is present in a freestanding implementation and a hosted implementation.

>    > -?- An enumerator of a freestanding item enumeration is a freestanding item.

>    > -?- Members of freestanding item class types are freestanding items.

>    > […]

[2022-11-08; Kona - move to open]

This will be resolved by the combined resolution in 3753.

[2022-11-22 Resolved by 3753 accepted in Kona. Status changed: Open → Resolved.]

Proposed resolution: