summaryrefslogtreecommitdiffstats
path: root/src/singleton.h
blob: 022e314e4f1493216e0df2ec86088992f21795ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

/**
 * A simple singleton implementation.
 */
template<class T>
struct Singleton {
	static T& instance() {
		static T inst;
		return inst;
	}
};