support bazel complie this project and format code.

This commit is contained in:
zhangxing
2023-03-30 00:15:11 +08:00
committed by light-city
parent 1f86192576
commit 3c8a3f259b
641 changed files with 10349 additions and 9523 deletions

View File

@@ -1,7 +1,7 @@
//
// Created by light on 20-2-7.
// 在C++11标准下《Effective C++》提出了一种更优雅的单例模式实现,使用函数内的 local static 对象。
// 这种方法也被称为Meyers' Singleton。
// 在C++11标准下《Effective C++》提出了一种更优雅的单例模式实现,使用函数内的
// local static 对象。 这种方法也被称为Meyers' Singleton。
//
#include <iostream>
@@ -10,14 +10,13 @@ using namespace std;
class singleton {
private:
singleton() {}
singleton() {}
public:
static singleton &instance();
static singleton &instance();
};
singleton &singleton::instance() {
static singleton p;
return p;
static singleton p;
return p;
}