summaryrefslogtreecommitdiffstats
path: root/src/include/util/singleton.H
blob: f448303df29f3c7e91ef507c2a961bc014088b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __UTIL_SINGLETON_H
#define __UTIL_SINGLETON_H

template <typename _T>
class Singleton : private _T
{
    public:
	static _T& instance()
	    {
		static Singleton<_T> instance;
		return instance;
	    };

    private:
	Singleton() : _T() {};
};

#endif
OpenPOWER on IntegriCloud