
Is there any other functionality that should be added? Specifically, is it sufficient to enforce that singletons are created in a specific order before main and destroyed in the reverse order after main (using dependency instances), or should I provide some way to support alternate lifetimes (ex: create on first reference to instance)?
Is there any interest in adding this library to Boost?
Would be good for boost to have a neat singleton. Check out Loki's and the recentish discussions in the archives regarding threading issues, particularly w.r.t. the double checked locking pattern for singletons. An optimised singleton implementation in boost would probably make use of portable fencing for concurrency. There is quite a bit more to a singleton pattern to cover most uses. matt. matthurd@acm.org