#ifndef SINGLETON_H
#define SINGLETON_H

namespace common {

template<typename T>
class Singleton {
public:
    static T& GetInstance() {
        static T instance;
        return instance;
    }
protected:
    virtual ~Singleton() {}
    Singleton() {}
    Singleton(const Singleton&) {}
    Singleton& operator =(const Singleton&) {}
};

} // namespace common


#endif // SINGLETON_H
