/* Collection of code snippets by Arne Vajhøj */
/* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) */
#ifndef SIMPLE_SINGLETON_11_H
#define SIMPLE_SINGLETON_11_H

#include <iostream>

using namespace std;

class SimpleSingleton11
{
private:
    static SimpleSingleton11* instance;
    int SomeState;
    SimpleSingleton11() { SomeState = 123; }
public:
    SimpleSingleton11(const SimpleSingleton11& original) = delete;
    SimpleSingleton11& operator=(const SimpleSingleton11& original) = delete;
    static SimpleSingleton11& Instance();
    void SomeMethod() { cout << SomeState << endl; }
};

#endif
