Test if an enum value is in a range of a derived enum

bearophile bearophileHUGS at lycos.com
Wed May 2 18:55:22 PDT 2012


Andrej Mitrovic:

> This writes "yes" so cast is a blunt tool that doesn't work in 
> this case. to!() doesn't work either (compile error, maybe I
> should file this) .

Seems worth filing.


> Anyone know of any other solutions?

Write your own function to perform the test, using a liner loop?

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list