I did not find a CRTP implementation among the answers, so here it is:
template<typename HeirT>class Singleton{public: Singleton() = delete; Singleton(const Singleton &) = delete; Singleton &operator=(const Singleton &) = delete; static HeirT &instance() { static HeirT instance; return instance; }};
To use just inherit your class from this, like: class Test : public Singleton<Test>