class XXX
{
private:
//构造函数
XXX();
public:
//拷贝构造
XXX(XXXconst&) = delete;
//赋值拷贝
XXX& operator=(XXXconst&) = delete;
= delete禁止使用
private禁止构造
class XXX
{
private:
//构造函数
XXX();
public:
//拷贝构造
XXX(XXXconst&) = delete;
//赋值拷贝
XXX& operator=(XXXconst&) = delete;
= delete禁止使用
private禁止构造
© 著作权归作者所有