The implicitly-declared move assignment operator would not be defined as deleted.给定x=10和y=5,下面的表格解释了赋值运算符:.
Given that x=10 and y=5, the table below explains the assignment operators.
Note that= is the assignment operator and== tests equality.
Bitwise AND assignment operator. c&= 2 is same as c= c& 2.Combinations with other parts of speech
模数和赋值运算符,它使用两个操作数获取模数,并将结果赋给左操作数C%=A相当于C=C%A.
Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand c%= a.与C类似,Swift提供复合赋值运算符来结合赋值(=)与其他操作。
Like C, Swift provides compound assignment operators that combine assignment(=) with another operation.模数和赋值运算符,它使用两个操作数来取模,并将结果分配给左操作数C%=A相当于C=C%A.
Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand c%= a.Note:虽然有很多可用的赋值运算符,但是这些是你现在应该学习的基本的一类。
Note: There are lots of other assignment operators available, but these are the basic ones you should learn now.例如,B引入复合(广义)赋值运算符,x=+y用于将y加到x。
For example, B introduced generalized assignment operators, using x=+y to add y to x.对于union类型,隐式定义的移动赋值运算符复制对象表示(如用std::memmove)。
For union types, the implicitly-defined move assignment operator copies the object representation(as by std::memmove).从3.0版开始,C++11根据需要声明了两个额外的特殊成员函数:移动构造函数和移动赋值运算符。
Since version 3.0, C++11 declares two additional special member functions on demand:the move constructor and the move assignment operator.这与上面不同,它进行了初始化(使用构造函数),而不是使用赋值运算符。
This differs from the above in that it initializes(using the constructor), rather than using the assignment operator.符号在Python(以及许多其它语言)中叫做赋值运算符。
The= symbol is called the assignment operator in Python(and many other languages).EffectiveC++第10条:让赋值运算符返回一个指向*this的引用.
C++ tip 6: Have assignment operators return a reference to*this.赋值运算符(=号)左边的变量需要能够保存存储在其中的值。
The variable on the left side of the assignment operator(= sign) needs to be able to hold the value stored in it.单个等号是赋值运算符,这里设置x为10(将值10存入变量x)。
The single equal sign is the assignment operator, and sets x to 10(puts the value 10 into the variable x).即只有无前提的函数,例如赋值运算符,才能安全地在对象被移动后使用:.
That is, only the functions without preconditions, such as the assignment operator, can be safely used on the object after it was moved from.
Remember that= is an assignment operator and== is a comparison operator..则编译器将声明移动赋值运算符为其类的inlinepublic成员,并拥有签名T&T::operator=(T&&)。
Then the compiler will declare a move assignment operator as an inline public member of its class with the signature T& T::operator=(T&&).不要混淆赋值运算符[=](单个等号)和比较运算符[==](双等号),后者求值两个表达式是否相等。
Don't confuse the assignment operator[=](single equal sign) with the comparison operator[==](double equal signs), which evaluates whether two expressions are equal.例如,规范4则(canonicalfour)(特指构造函数、析构函数、拷贝赋值运算符、赋值运算符)被作为那些特定成员函数的正式名称。
For example, the canonical four(constructor, destructor, copy assignment operator, and assignment operator) are formally known as the special member functions.
Note that the assignment operator itself(=) cannot be overloaded.
The combined assignment operator+= even works with strings.
We can use assignment statements to give new names to existing functions.首先,我们使用赋值运算符(=)将常量5赋值给变量i。
First, we assign the literal constant value 5 to the variable i using the..常用的算术转换不适用于赋值运算符、逻辑运算符&&和||。
The usual arithmetic conversions are not performed for the assignment operators, nor for the logical operators&& and||.EOF其它赋值运算符(如+=、-=等)也可以用在表达式中,尽管这种用法比较少见。
The other assignment operators(+=,-=, etc.) can also occur in expressions, although this is less frequent.通常的算术转换不是为赋值运算符执行,也不是为逻辑运算符&&和||执行。
The usual arithmetic conversions are not performed for the assignment operators, nor for the logical operators&& and||.重载赋值操作符是一个特别的赋值运算符,通常是用来把已存在的对象指定给其它相同类型的对象。
Copy assignment operator is a special assignment operator that is usually used to specify an existing object to others of the same type of object.