So this is the equality operator, whereas the single equal sign is the assignment operator.
所以这是相等操作符,然而那个单等号是一个赋值运算符。
You cannot use the default equality operator in an overloaded implementation of the equality operator.
不能在相等运算符的重载实现中使用默认相等运算符。
Types typically implement the inequality operator by returning the negated value of the equality operator.
类型通常通过返回相等运算符的反值来实现不等运算符。
If your programming language supports operator overloads, you should consider implementing the equality operator.
如果编程语言支持运算符重载,则应考虑实现相等运算符。
As an example of when RTTI might be useful, consider a class hierarchy for which we'd like to implement the equality operator.
作为说明何时可以使用RTTI的例子,考虑一个类层次,我们希望为它实现相等操作符。
As an example of when RTTI might be useful, consider a class hierarchy for which we'd like to implement the equality operator.
作为说明何时可以使用RTTI的例子,考虑一个类层次,我们希望为它实现相等操作符。
应用推荐