Title
Freestanding enumerators specification is lacking
Status
resolved
Section
[freestanding.item][atomics.syn]
Submitter
Ben Craig

Created on 2022-11-06.00:00:00 last changed 17 months ago

Messages

Date: 2022-11-22.00:00:00

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

Date: 2022-11-15.00:00:00

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

This will be resolved by the combined resolution in 3753.

Date: 2022-11-08.16:06:32

This is a partial resolution of GB-130 ([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 [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. [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 [freestanding.entity]#2.

  1. Modify [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 [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 [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.

    […]

History
Date User Action Args
2022-11-22 00:48:24adminsetmessages: + msg13110
2022-11-22 00:48:24adminsetstatus: open -> resolved
2022-11-08 16:06:32adminsetstatus: new -> open
2022-11-07 17:27:34adminsetmessages: + msg12946
2022-11-06 00:00:00admincreate