mirror of
https://github.com/lucaspalomodevelop/lpstd.git
synced 2026-03-13 15:34:36 +00:00
23 lines
367 B
C++
23 lines
367 B
C++
|
|
namespace lpstd
|
|
{
|
|
template <typename T>
|
|
class Singleton
|
|
{
|
|
public:
|
|
static T &Instance()
|
|
{
|
|
static T _instance;
|
|
return _instance;
|
|
}
|
|
|
|
protected:
|
|
Singleton() {}
|
|
~Singleton() {}
|
|
|
|
private:
|
|
Singleton(Singleton const &);
|
|
Singleton &operator=(Singleton const &);
|
|
};
|
|
}
|