Immutable struct with AA init problem
Uranuz
neuranuz at gmail.com
Tue Nov 26 02:12:43 PST 2013
As far as I understand in current implementation of Dlang it's
not possible to write:
immutable(EnumFormat) magicCreatures =
immutable(EnumFormat)([1:"goblin", 2:"ork", 3:"elf", 7:"dwarf"],
false);
It's because AA literal isn't immutable. But is there some method
similar to assumeUnique() for AA? Using static this() to define
some constants looks awkward as I believe.
More information about the Digitalmars-d-learn
mailing list