Boost logo

Boost :

From: John Torjo (john.groups_at_[hidden])
Date: 2008-02-04 11:43:52


>> One thing I don't like is the initialization of boost::flyweight:
>> http://svn.boost.org/svn/boost/sandbox/flyweight/libs/flyweight/doc/tutorial/technical.html
>> I think there could be a simpler way to do this:
>> http://www.entropygames.net/globals.htm
>>
>
> Well, static_holder (which is conceptually very similar to a singleton) does in fact
> relies on Meyers' idiom, all the complications described at the referred section stems from
> the fact that initialization is forced to happen in pre-main() time to avoid multi-threaded
> clashes (which are deemed more unlikely before than after main() starts). Note that
> the singletons described at your article can pose problems if first accessed
> simultaneously from two different threads --this is what I tried to avoid in my lib.
>
I was talking about depends_on class

Best,
John

-- 
http://John.Torjo.com -- C++ expert
... call me only if you want things done right

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk