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

#include <iostream>
#include <atomic>

using namespace std;

class MemBarrierSingleton11
{
private:
    static atomic<MemBarrierSingleton11*> instance;
    MemBarrierSingleton11();
public:
    MemBarrierSingleton11(const MemBarrierSingleton11& original) = delete;
    MemBarrierSingleton11& operator=(const MemBarrierSingleton11& original) = delete;
    static MemBarrierSingleton11& Instance();
    void Something();
};

#endif
