Singleton construction via the curiously recurring template pattern. More...
#include <singleton.hpp>
Public Member Functions | |
virtual | ~Singleton () |
Static Public Member Functions | |
static T & | instance () |
Singleton construction via the curiously recurring template pattern.
This class doesn't provide singletons, but enables the construction of referenced based singletons via the curiously recurring template pattern.
If you wish to create a singleton, simply:
Definition at line 55 of file singleton.hpp.
|
inlinevirtual |
Definition at line 75 of file singleton.hpp.
|
inlinestatic |
Stores a reference to a single instantiation of the template object. If the template class has a protected or private default constructor (no arguments), then it ensures the class will be a singleton itself.
Definition at line 69 of file singleton.hpp.