Boost logo

Boost Users :

From: Robert Dailey (rcdailey_at_[hidden])
Date: 2007-12-05 16:15:19


Hi,

I was wondering if the boost library had a class that I could derive my
classes from to declare a singleton. For example:

class MyClass : public boost::singleton<MyClass> {};

Something like that. I noticed there's a singleton.hpp in
"boost\pool\detail", however this seems like an odd place for such a common
and useful class. I'm actually a bit scared to use anything in a 'detail'
folder, as usually (at least to me) that means private code or
implementation details (not to be used).

Is there a singleton type class in boost to help simplify the process of
creating a singleton? Thanks.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net