Boost logo

Boost Users :

Subject: Re: [Boost-users] *****SPAM***** Re: shared_ptr singleton
From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2008-10-16 23:12:52

On Thursday 16 October 2008 22:56, Frank Mori Hess wrote:
> Hmm, so I guess it is impossible to make a thread-safe singleton that
> avoids the static initialization order fiasco, unless your compiler
> guarantees thread-safe initialization of local statics. Even
> boost::call_once would require the once_flag to be statically
> initialized before the call_once call happens.

Err, nevermind. Apparently static POD types (once_flag) are guaranteed to
be initialized before any constructors are run.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at