当前位置: 代码迷 >> 综合 >> 类的6个默认
  详细解决方案

类的6个默认

热度:10   发布时间:2023-10-14 03:33:33.0
class AA
{
   
public:
    AA(int * i);//构造
    AA(const AA & another);//DEEP构造
    AA(AA && another);//移动构造
    AA& operator=(AA && another);//移动赋值
    AA& operator=(const AA & another);//赋值拷贝
    ~AA();//析构
//private:
    int * i_;
};
  相关解决方案