Skip to content

Instantly share code, notes, and snippets.

@Ratstail91
Created May 11, 2013 14:52
Show Gist options
  • 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