/** ** \file misc/singleton.hh ** \brief Generic singleton */ #pragma once namespace misc { template class Singleton { // FIXME DONE: Some code was deleted here. protected: Singleton() = default; private: Singleton(const Singleton&) = delete; Singleton& operator=(const Singleton&) = delete; public: static T& instance() { static T instance_; return instance_; } }; } // namespace misc