Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2001-11-20 16:31:15


> > > Have you looked at Andrei Alexandrescu's work? It's possible that
> > > the reusable singleton class you're looking for already exists.
> >
> > Yes, of course. It could become good starting point, not the final
> > solution.
>
> What do you think is missing from Andrei Alexandrescu's version in Loki?

From field experience here are a couple of things that Singleton is missing:

* Better support for compilers with broken atexit()

* Better support for weaker compilers not supporting template templates.

* Peter Nordlund noticed a bug in exception safety of Singletons with
Longevity: first the Singleton object is created, and only then it is put in
the priority queue. The operations must be in reversed order.

I'm sure there are more; these are the ones that appeared so far.

Andrei


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