isMutable doesn't work with enum ?

Jonathan M Davis jmdavisProg at gmx.com
Sun Jun 2 15:42:09 PDT 2013


On Monday, June 03, 2013 00:36:46 Temtaime wrote:
> I'm writing serializer and it iterates all members of struct.
> It compares fields marked as "enum" when reading from file to
> check BOM, for example.
> 
> I'm using enum now because const members are deprecated in 2.063.

The equivalent to what const members were doing before is static const. static 
was being implicitly tacked onto the const. enums do something subtley 
different. static const variables are actually variables with addresses 
(lvalues), whereas enums have no address and are rvalues.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list