pitfalls of enum

bearophile bearophileHUGS at lycos.com
Thu Nov 14 17:02:41 PST 2013


Ali Çehreli:

> > When is an enum *better* than a normal (static
> const/immutable) constant?
>
> Good question. :)

When you can or want to compute something at compile-time, when 
you need values to feed to templates, etc.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list