To: J3 J3/22-122 From: Van Snyder Subject: Enumeration type constructor Date: 2022-February-20 Reference: 22-007 For documentation purposes, it would be useful to allow the argument to be an enumerator of the type. The description of does not specify the type of the result. Edits ----- [91:25 7.6.2 Enumeration types R771] Replace "scalar-int-expr" with "scalar-expr". [91:25+ 7.6.2 Enumeration types R771+] Insert a constraint: "C7116a (R771) The shall be of type integer or the type specified by ." [91:26 7.6.2p5 Enumeration types] Replace "the" with "a". After "enumeration type" insert "specified by . If the is of type integer, the result is the enumerator". [91:27 7.6.2p5 Enumeration types] Replace :" with " twice. [91:28 7.6.2p5 Enumeration types] Append a sentence: "If the is of enumeration type, the value of the result is the same as ." The revised 7.6.2p5 becomes An enumeration constructor returns a value of the enumeration type specified by . If the is of type integer, the result is the enumerator whose ordinal position is the value of the . The shall have a value that is positive and less than or equal to the number of enumerators in the enumeration type?s definition. If the is of enumeration type, the value of the result is the same as .