// NOTE in c++ a singleton is equivalent to just a namespace
class Singleton
{
public:
// Prevents any type of copy or new instance
Singleton(const Singleton&) = delete;
void operator=(const Singleton&) = delete;
static Singleton& Get()
{
static Singleton instance;
return instance;
}
static int GetData() { return Get().someData}
private:
Singleton() {}
int someData = 1;
};