所以你并不需要使用赋值运算符。
所以这是相等操作符,然而那个单等号是一个赋值运算符。
So this is the equality operator, whereas the single equal sign is the assignment operator.
ASSIGN_OP 中的模式匹配任何标准的赋值运算符:=、+=、-=、*=,等等,但是注意不要匹配其他包含 = 的运算符,比如 ==和 =~。
The pattern in ASSIGN_OP matches any of the standard assignment operators: =, +=, -=, *=, etc. but carefully avoids matching other operators that contain =, such as == and =~.
现在,尝试为类a使用一个复制结构和运算符赋值,在清单15中声明该类。
Now, try using a copy construction and operator assignment for class a, declared in Listing 15.
而赋值运算符在优化之后还存活并从DLL中导出。
However, the assignment operator survived optimization and got exported from a DLL.
所以到现在为止,赋值运算符复制了很多数据。
当for循环遍历了所有行之后,这些行中的赋值运算符将被正确对齐。
Once the for loop has iterated all the lines, any assignment operators within them will now be aligned correctly.
变量是在赋值时动态键入的,因此不需要预先声明变量或者使用new运算符。
Variables are dynamically typed on assignment, so there is no need to pre-declare variables or use the new operator.
那个等号其实是个“赋值运算符。”
AlignAssignments()中的第一个for循环判断其中的赋值运算符应当对齐的列。
The first for loop in AlignAssignments() determines the column in which the assignment operators should be aligned.
目标在于避免意外地使用单等号赋值运算符而非双等号比较运算符
The goal here is to avoid accidentally using the single-equals assignment operator instead of the double-equals comparison operator
其中包括前后加/减(i++、--foo), 加减乘除赋值运算符(a+=3、b*=2、c/=2.2、d-=6.2)。
These include pre- and post-increment/decrement ( i++, --foo ), add/sub/mult/div assign operators ( a+=3, b*=2, c/=2.2, d-=6.2 ).
如何从复制赋值运算符调用复制构造函数?
How to call to the copy constructor from the copy-assignment operator?
每个类(其实例要在容器内使用)必须至少实现拷贝构造函数(实现赋值运算符,也是好习惯)。
Each class whose instance will go into the container must implement at least the copy constructor it is good to implement also the assignment operator.
和字符串不同的是,列表是可以修改的。方括号运算符放到一个赋值语句的等号左侧的时候,就会把对应位置的列表元素重新赋值。
Unlike strings, lists are mutable. When the bracket operator appears on the left side of an assignment, it identifies the element of the list that will be assigned.
所有的赋值运算符都返回赋给左操作数的值。
All assignment operators return the value that is assigned to the left operand.
右侧的内容先进行运算,然后这些元素会赋值给左侧的变量。
The right side is evaluated and then its elements are assigned to the variables on the left.
放在单独的功能调用析构函数和拷贝构造函数和赋值运算符你所需要的功能。
Put the functionality you need in separate functions called by the destructor and the copy constructor and the assignment operator.
使用运算符可以执行算术、比较、串联或赋值操作。
Operators allow you to perform arithmetic, comparison, concatenation, or assignment of values.
构造函数有三种情况,在重载赋值运算符时一定要分清楚。
As the construction function has three kinds of different conditions, assignment operator overriding must be given attention.
赋值运算符是应用于一个初始化的对象,但这并不是拷贝构造函数的情况下。
The assignment operator is applied on a initialized object, but this is not the case in the copy constructor.
然后,调用赋值运算符。
拷贝赋值运算符是由编译器自动实现,除非你提供一个。
A copy assignment operator is implemented by the compiler automatically unless you provide one.
不能重载赋值运算符。
基类中的赋值运算符不可访问,因此无法为派生类生成赋值运算符。
An assignment operator was not accessible in a base class and was therefore not generated for a derived class.
除赋值运算符外,重载运算符可由派生类继承下去。
Outside dividing assignment operation accord with, heavy carry calculates Fu Ke by derive kind successive go down.
不过,可为类型定义隐式转换运算符,这样就可以对这些类型使用赋值运算符。
However, you can define implicit conversion operators for a type, which enable you to use the assignment operator with those types.
不过,可为类型定义隐式转换运算符,这样就可以对这些类型使用赋值运算符。
However, you can define implicit conversion operators for a type, which enable you to use the assignment operator with those types.
应用推荐