#ifndef SINGLETON #define SINGLETON #include template class SingletonT { public: SingletonT() = delete; static Object * Instance (std::string name) { if (theObject == nullptr) { theObject = new Object(name); } return theObject; } private: static inline Object * theObject = nullptr; }; #endif