Cemu/src/util/helpers/Singleton.h
2022-08-22 22:21:23 +02:00

17 lines
275 B
C++

#pragma once
template<typename TType>
class Singleton
{
protected:
Singleton() = default;
Singleton(const Singleton&) = delete;
Singleton(Singleton&&) noexcept = delete;
public:
static TType& instance() noexcept
{
static TType s_instance;
return s_instance;
}
};