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

#include <mutex>

using namespace std;

class MeyersSingleton11
{
private:
    mutex mymutex;
    long long counter;
    MeyersSingleton11() { }
public:
    MeyersSingleton11(const MeyersSingleton11& original) = delete;
    MeyersSingleton11& operator=(const MeyersSingleton11& original) = delete;
    static MeyersSingleton11& Instance();
    void Reset();
    void Increment();
    long long GetCounter();
};

#endif
