An open API service indexing awesome lists of open source software.

https://github.com/bunnysakura/singleton-cpp

C++单例模板
https://github.com/bunnysakura/singleton-cpp

header header-only headeronly singleton singleton-class

Last synced: about 1 month ago
JSON representation

C++单例模板

Awesome Lists containing this project

README

          

# singleton-cpp

*C++单头文件实现的单例模板。*

## 使用

- 直接使用(推荐)

```cpp
Singleton::GetInstance() // 无参构造
Singleton::GetInstance(... Args) // 传入任意参数进行构造
```

- 继承派生

```cpp
class C : public Singleton
```