1 Star 0 Fork 0

sun152121/cpp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Singleton.h 343 Bytes
一键复制 编辑 原始数据 按行查看 历史
sun152121 提交于 2016-05-16 20:22 +08:00 . init commit
#ifndef SINGLETON_H
#define SINGLETON_H
template<class T>
class Singleton
{
public:
static T* getInstance(){
static T instance;
return &instance;
}
protected:
Singleton(){}
virtual ~Singleton(){}
Singleton(const Singleton<T>&);
Singleton<T>& operator=(const Singleton<T>&);
};
#endif // SINGLETON_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/appcode/cpp.git
git@gitee.com:appcode/cpp.git
appcode
cpp
cpp
master

搜索帮助