29 Aug
2005
29 Aug
'05
11:17 p.m.
It's not a question of microseconds. The "thread safe singleton"
Peter Dimov wrote: pattern
solves the initialization order problem. You want a particular object to be available for the lifetime of the program, as if it was initialized before everything else and destroyed after everything else.
C++ doesn't guarantee a particular initialization order for file scope objects in different translation units, so we have to resort to local statics or call_once.
I hear you, I hear the point. I don't have a good solution to this, but I hope someone does!