Created
May 11, 2013 14:52
-
-
Save Ratstail91/5560170 to your computer and use it in GitHub Desktop.
This isn't compiling.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SINGLETON_HPP_ | |
#define SINGLETON_HPP_ | |
template<typename T> | |
class Singleton { | |
public: | |
static T* GetSingletonPtr() { | |
return &singleton; | |
} | |
static T& GetSingletonRef() { | |
return singleton; | |
} | |
private: | |
Singleton(); | |
~Singleton(); | |
Singleton(const Singleton&); | |
Singleton& operator=(const Singleton&); | |
Singleton(Singleton&&); | |
Singleton& operator=(Singleton&&); | |
static T singleton; | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment