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 51 of file singleton.hpp.
|
inlinevirtual |
Definition at line 65 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 59 of file singleton.hpp.