Skip to content

Instantly share code, notes, and snippets.

@Ratstail91
Created May 11, 2013 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ratstail91/5560170 to your computer and use it in GitHub Desktop.
Save Ratstail91/5560170 to your computer and use it in GitHub Desktop.
This isn't compiling.
#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