This is very similar to singleton pattern and something used by Qt (apart from the fact that it's probably not thread safe) : Q_GLOBAL_STATIC(TYPE, NAME) macro defined in qtglobal.h
However it does not solve my problem because it won't be called BEFORE ALL STATIC CONSTRUCTORS of the program and attached libraries...
Bookmarks