Non-constant expression error
Márcio Faustino
m.faustino at no.spam.gmail.com
Wed Aug 22 06:46:28 PDT 2007
Jarrett Billingsley wrote:
> Because those expressions aren't constant. Hate to sound obvious XD
>
> You can't use non-constant expressions (like function calls (well....
> because of CTFE sometimes those are legal), 'new') as the initializer to
> globals or class members because the compiler builds up their initializers
> in the static data segment. Fortunately there are ways to do this:
>
> (...)
>
Thanks! ;-)
More information about the Digitalmars-d-learn
mailing list