symmetric_matrix &operator += (const matrix_expression运算赋值运算符(computed assignment operator)。将一个矩阵表达式加到一个对称矩阵中。
基于8个网页-相关网页
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 =~.
目标在于避免意外地使用单等号赋值运算符而非双等号比较运算符
The goal here is to avoid accidentally using the single-equals assignment operator instead of the double-equals comparison operator
不过,可为类型定义隐式转换运算符,这样就可以对这些类型使用赋值运算符。
However, you can define implicit conversion operators for a type, which enable you to use the assignment operator with those types.
- And here as promised is that other operator -- looks a little weird, but because assignment is already using the equal sign to assign one value on the right to a variable on the left.
在这里正像所承诺的那样,其他的操作-,看起来有点怪异,但是因为“=“已经被用来当赋值运算符了,用来把右边的一个值赋值给左边的变量。
So this is the equality operator, whereas the single equal sign is the assignment operator.
所以这是相等操作符,然而那个单等号是一个赋值运算符。
The equal sign is really called the "assignment operator."
那个等号其实是个“赋值运算符“
应用推荐