📄 noncopyable.h
字号:
////////////////////////////////////////////////////////////////////////////////
// Author : 黎达文
// Description : 定义一个基类表示不可以复制的概念。
// 当一个类需要这些概念的时候只要继承它就可以了。
//
// Version :
//
// Standard include files :
//
// Start Date : 2003年6月20日
//
// Change Log :
// 2003年6月20日 by 黎达文
// -- Created
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_NONCOPYABLE_H
#define INCLUDED_NONCOPYABLE_H
#if defined(HAS_PRAGMA_ONCE)
#pragma PRAGMA_ONCE_DECLARE
#endif
namespace stk
{
// Private copy constructor and copy assignment ensure classes derived from
// class noncopyable cannot be copied.
class noncopyable
{
protected:
noncopyable() {}
~noncopyable() {}
private: // emphasize the following members are private
noncopyable( const noncopyable& );
const noncopyable& operator=( const noncopyable& );
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -