You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
370 B
23 lines
370 B
|
|
#ifndef CPP_START_NON_COPY_ABLE_H
|
|
#define CPP_START_NON_COPY_ABLE_H
|
|
|
|
|
|
class NonCopyAble {
|
|
|
|
protected:
|
|
NonCopyAble() = default;
|
|
|
|
~NonCopyAble() = default;
|
|
|
|
public:
|
|
// 禁用复制构造
|
|
NonCopyAble(const NonCopyAble &) = delete;
|
|
|
|
// 禁用赋值构造
|
|
NonCopyAble &operator=(const NonCopyAble &) = delete;
|
|
};
|
|
|
|
|
|
#endif //CPP_START_NON_COPY_ABLE_H
|