这种情况的原因在于,编译器在编译时仅知道t是引用类型,因此必须使用对所有引用类型都有效的默认运算符。
The reason for this behavior is that, at compile time, the compiler only knows that t is a reference type, and therefore must use the default operators that are valid for all reference types.
不能在相等运算符的重载实现中使用默认相等运算符。
You cannot use the default equality operator in an overloaded implementation of the equality operator.
不能在相等运算符的重载实现中使用默认相等运算符。
You cannot use the default equality operator in an overloaded implementation of the equality operator.
应用推荐