Hi,
In the
Construction Rules for enum class Values (p0138r2) I see
contradictory expressions about allowing relaxed initialization for enum types with declared enumerators:
a) The text says:
EWG did consider the request of extending the relaxation suggested in this paper to enumerations
with declared enumerators, but ultimately rejected that suggestion.
Which I understand as that the new relaxed initialization should be only applied to enums without enumerators.
b) But the example shows the opposite:
enum class Handle : uint32_t { Invalid = 0 };
Handle h { 42 }; // OK
Does anybody know whether it was decided to apply the new relaxed initialization to enums without enumerators or not?
And if yes then what was the logic behind this decision? (I can't come up with any good argument for allowing such an easy way to violate an enum's domain.)
Thank you,
Andrey
P.S. That's my first topic in the group so please be indulgent and point me to the group rules I have to follow.