5 Dec
2007
5 Dec
'07
9:15 p.m.
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.