However, the assignment operator survived optimization and got exported from a DLL.
而赋值运算符在优化之后还存活并从DLL中导出。
Now, try using a copy construction and operator assignment for class a, declared in Listing 15.
现在,尝试为类a使用一个复制结构和运算符赋值,在清单15中声明该类。
Well, the assignment operator makes a copy of the thing on the right and puts it in the thing on the left.
赋值操作符把右边的东西,复制到左边。
To manage a class with pointer members, we must define all three copy-control members: the copy constructor, assignment operator, and the destructor.
为了管理具有指针成员的类,必须定义三个复制控制成员:复制构造函数、赋值操作符和析构函数。
Put the functionality you need in separate functions called by the destructor and the copy constructor and the assignment operator.
放在单独的功能调用析构函数和拷贝构造函数和赋值运算符你所需要的功能。
When I return by value from an assignment operator, firstly what is the mechanism and basis of calling the copy constructor?
当我返回值赋值操作符,首先是调用复制构造函数为基础的机制?
An assignment operator was not accessible in a base class and was therefore not generated for a derived class.
基类中的赋值运算符不可访问,因此无法为派生类生成赋值运算符。
An assignment operator was not accessible in a base class and was therefore not generated for a derived class.
基类中的赋值运算符不可访问,因此无法为派生类生成赋值运算符。
应用推荐