A const idiom + a different 'delete'
bearophile
bearophileHUGS at lycos.com
Wed Aug 11 10:52:30 PDT 2010
Jonathan M Davis:
> I think that's a total no-go because it would depend on program flow.
You are of course right, it's the silly thing of the day. The #undef works because it's not scoped.
>You kind hide the variable creation inside another scope if you want this sort of behavior:<
You can't do that, you can't modify a const variable in that way :-)
I will just keep two variables, one immutable and one mutable, as in the first example.
Later,
bearophile
More information about the Digitalmars-d
mailing list