
21 May
2003
21 May
'03
9:50 p.m.
sashan wrote:
Is there construct that supports the singleton idea in boost? I've searched through the docs but may have missed it. I find it odd that it's not there.
There's no official singleton in the boost lib (yet). AFAIK it's simply because failure to reach an agreement on what is the "proper" singleton impl. But you can always check the yahoo file-area, should be a couple of informal singleton proposals there. Otherwise I would recommend you to look at the policy-based singletons part of Loki (see 'Modern C++ Design' by Alexandrescu) for a high quality implementation. Especially if you want a thorough discussion of all the subtleties involved. /Fredrik