Hello,

I am currently evaluating boost.singleton for our application. I hope it is not too late to write a review. As I understood from the docs, Singleton instance is immediately (when all global and static variables are initilized) created. In our context we need singleton to be created on first request (as it is described in GoF).


The problem is following: Our application must parse config file which is accessible after entering main and store the options/parameters parsed in a singleton class. If I initialize singleton immediately (before entering main) I can not parse command line options and have to trick around with some additional functions which do it for me (but a constructor would be a much better choice, when I try for the first time to access the singleton).


Is that possible with the current implementation? I know I could overload operator-> and check that options are parsed, but I think this is a not so obvious scenario for everyone.



With Kind Regards,
Ovanes