The-Powder-Toy/src/Singleton.h
2012-01-17 20:46:06 +00:00

17 lines
178 B
C++

#ifndef SINGLETON_H
#define SINGLETON_H
template<typename T>
class Singleton
{
public:
static T& Ref()
{
static T instance;
return instance;
}
};
#endif // SINGLETON_H