Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2008-02-04 12:18:13

John Torjo ha escrito:

> >> One thing I don't like is the initialization of boost::flyweight:
> >>
> >> I think there could be a simpler way to do this:
> >>
> >>
> >
> > 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

Oh, excuse my misunderstanding. In which way do you think that the depends_on
class can simplify the static initialization issues for the flyweight lib?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at