Tuesday, May 22, 2012

Possible to initialize static variable by calling function

Is this possible?



static bool initialize()
{
TRC_SCOPE_INIT(...);
...
}

static bool initialized = initialize();


To make a very long story short, I need to call a series of macros (to initialize debugging messages) as early as possible (before thread X is started, and I don't have the ability to know when thread X is started).





No comments:

Post a Comment