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.