The-Powder-Toy/includes/Singleton.h
2012-01-14 18:51:24 +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