c++禁用拷贝构造函数和赋值函数
// A macro to disallow the copy constructor and operator= functions
#ifndef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
TypeName& operator=(const TypeName&) = delete;
#endif
节选自 https://github.com/PlatformLab/NanoLog.git
代码中: <<common.h>>