Reputation: 6326
I am a newbie to boost.I find that there two ways to use boost::singleton.Code pasted below:
// First
class Foo {};
#define FooInstane singleton_default<Foo>::instance()
// second
class Bar : public singleton_default<Bar> {};
#define BarInstance Bar::instance()
I think both are OK.But I cannot find some authoritative conclusion.
Question: Which one is right? Or both right(Then which one is better)?
The doc of boost::singleton can be find here.
Upvotes: 4
Views: 5457
Reputation: 76316
Neither. The class does not exist any more.
The class was never intended for users. It was only for internal purposes of the Boost.Pool library and was apparently removed. There are some other singleton classes, but all are hidden in the private details of various components.
Upvotes: 4