On 2012-11-29 18:35, Andrei Alexandrescu wrote:

There are plenty of patterns for solving order of initialization issues
in libraries, known since time immemorial. Requiring a library
initialization call would be the simplest (albeit not the most elegant).
The Monostate and Singleton patterns also come to mind.

This is just not something that has no solution. Better solutions are
always welcome, but keeping a baseline is always useful.

Another standard solution is to use functions which lazily initialize some value.

--
/Jacob Carlborg

Reply via email to