32 static T* instance() {
33 if (not instance_) instance_ = std::unique_ptr<T>(
new T);
34 return instance_.get();
36 static bool instance_exists() {
return instance_.get() !=
nullptr; }
37 static void delete_instance() { instance_.reset(); }
41 static std::unique_ptr<T> instance_;