mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 23:41:18 +12:00
17 lines
275 B
C++
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;
|
|
}
|
|
};
|