#ifndef SINGLETON_H #define SINGLETON_H template class Singleton { public: static T& GetInstance() { static T instance; return instance; } Singleton(const Singleton&) = delete; Singleton& operator=(const Singleton&) = delete; protected: Singleton() {} ~Singleton() {} }; #endif