DIPX: Enum Literals / Implicit Selector Expression

bauss jj_1337 at live.dk
Thu Jun 30 09:57:50 UTC 2022


On Thursday, 30 June 2022 at 09:50:34 UTC, Ola Fosheim Grøstad 
wrote:
> On Thursday, 30 June 2022 at 09:19:15 UTC, bauss wrote:
>> However I can see the argument for other people wanting the 
>> first one to be a compiler error because it's ambiguous, or 
>> even that you cannot override enum values and thus it will 
>> take the value from Color.
>
> C++ solves this with `enum class` for stricter enumeration 
> semantics.

I think that again depends on what one expects to happen, as it 
only solves it if that's the perceived correct behavior.


More information about the Digitalmars-d mailing list