enum values without initializer

bearophile bearophileHUGS at lycos.com
Sun Apr 4 02:56:36 PDT 2010


Nick Sabalausky:

> > If you don't want that doplication you can also write:
> > enum auto f = Foo();
> 
> Can't you do:
> enum f = Foo();
> ?

In my opinion that's a semantic mess, I don't write that. auto is for automatic local type inference and enum is to ask for a compile time constant.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list