Range of enum type values

Timon Gehr timon.gehr at gmx.ch
Sat Dec 28 14:03:46 UTC 2019

On 27.12.19 19:12, Johan Engelen wrote:
> Current language behavior:
> enum value range = full range of base type; integer operations work 
> as-if the type is the base type.
> Future:
> Several options + lots of discussion ;-) and DIP needed.
> Can I summarize it like that?

I think so, but you might want to add that currently, e.g. `cast(E)x` is 
@safe for an `enum E:typeof(x){ ... }`

More information about the Digitalmars-d mailing list