non-constant expression
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Wed Jan 24 06:27:24 PST 2007
Jarrett Billingsley wrote:
> It looks weird, declaring a as a const and then assigning it in the static
> this(), but that's perfectly legal -- you can assign to constant values
> once, but that assignment can happen anywhere.
I'm pretty sure you can only assign it in the appropriate constructor:
static member --> static this() as member of same class/struct/whatever
non-static member --> this() [other parameter lists also allowed]
module-scope --> static this() at module scope
More information about the Digitalmars-d-learn
mailing list