template <typename T>
template <typename T>
class singleton
{
public:
static T& example()
{
static T example;
return example;
}
singleton(T&&) = delete;
singleton(const T&) = delete;
void operator=(const T&) = delete;
protected:
singleton() = default;
virtual ~singleton() = default;
};
class entity : public singleton<entity>
{
public:
entity();
~entity();
private:
};
entity::entity()
{
}
entity::~entity()
{
}