static static
bearophile
bearophileHUGS at lycos.com
Tue Nov 10 10:35:36 PST 2009
When I convert a function to a templated function (for example because I know the value of an argument at compile time, so using a template gives me a poor's man partial compilation) the static variables get duplicated for each instance of the function template, and I may need to use true global variables/constants (but if you use link-time optimization then LDC is able to remove such shared constants).
So I was thinking about a "static static" attribute that avoid moving the statics to globals. Is this a useless idea?
Bye,
bearophile
More information about the Digitalmars-d
mailing list