You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dribble/cpp/localization/Singleton.h

21 lines
325 B
C++

#ifndef SINGLETON_H
#define SINGLETON_H
template <class T>
class Singleton {
public:
static T& getInstance() {
static T instance;
return instance;
}
private:
Singleton();
~Singleton();
Singleton(Singleton const&);
Singleton& operator=(Singleton const&);
};
#endif // SINGLETON_H