any tool to at least partially convert C++ to D (htod for source
Ellery Newcomer
ellery-newcomer at utulsa.edu
Wed Mar 10 16:22:26 PST 2010
On 03/10/2010 05:14 PM, grauzone wrote:
>
> You could move the static ctor into another module outside of the cycle
> (e.g. the module where your main() function is). Then you get the same
> effects as "platform" dependent initialization.
>
most of my static ctors just set a logger object meant for use within
the module. In retrospect, it was kind of a boneheaded thing to do,
since the loggers all get initialized inside the logger module anyways.
Actually, all of it was to work around the idiom
static Object singleton = new Object();
which doesn't have a 1-1 correspondence in D. I've converted most of
them to enums..
More information about the Digitalmars-d
mailing list