template parameter of base class is derived class
When instantiating Singleton<>, how does the compiler know what constructors are available for class Updater? I'm referring to the bolded line.
(This code is greatly reduced, but I see something just like it running around in the wild.)
There is something that I do not understand about the order in which the compiler sees symbols. Thanks!
static SingletonClass & instance();
static auto_ptr<SingletonClass> ptr;
// and the other constructors
template <typename SingletonClass>
SingletonClass & Singleton<SingletonClass>::instance()
if (ptr.get() == 0)
// . . .
class Updater : public Singleton<Updater>
// constructors and methods and all that..