enum values without initializer

Ali Çehreli acehreli at yahoo.com
Sat Apr 3 16:02:56 PDT 2010


bearophile wrote:
> Do you know why this is an error?
> 
> struct Foo {}
> enum Foo f;
> void main() {}
> 
> 
> I think there's no need to consider it an error (and it can't cause runtime bugs):
> http://d.puremagic.com/issues/show_bug.cgi?id=4049
> 
> Bye,
> bearophile

I have to ask. :) What does that code supposed to mean?

Is Foo the base type of the enum, so that we can create enum values for 
user types as well?

Ali


More information about the Digitalmars-d-learn mailing list