Template Class singleton

Class Documentation

template<class T>
class singleton

Define a class as incapable of being moved, copied, etc., and that there can only ever be one of. The only restriction on derived classes is that the must have a zero parameter constructor available.

Public Functions

singleton(singleton&&) = delete
singleton(singleton const&) = delete
singleton &operator=(singleton&&) = delete
singleton &operator=(singleton const&) = delete

Public Static Functions

static inline T &instance()

Get the instance of the singleton.

Protected Functions

singleton(void) = default
~singleton(void) = default