2 problems I can't get my head around

Walter Bright newshound2 at digitalmars.com
Tue Nov 27 13:16:32 PST 2012


On 11/27/2012 9:51 PM, Manu wrote:
> There's another you missed:
> enum X = 10;
> I would have imagined this would be semantically identical to E.A/E.B,
> but the compiler seemed to view this as distinct in my experiments.

Those are not enums, they are manifest constants. What distinguishes a 
manifest constant from, say:

     const Y = 11;

is that no storage is allocated for X, and X's address cannot be taken.


More information about the Digitalmars-d mailing list