尤其是运算符重载,这种情况出现的时候。
运算符重载允许创建与语言无缝集成的新数据类型。
Operator overloading allows new data types to be created that seamlessly integrate into the language.
讨论运算符重载的更改。
如果编程语言支持运算符重载,则应考虑实现相等运算符。
If your programming language supports operator overloads, you should consider implementing the equality operator.
如果编程语言支持运算符重载,则还应提供等号和不等号运算符的实现。
If your programming language supports operator overloading, you should also provide an implementation of the equality and inequality operators.
运算符重载——对运算符进行重载可以使DSL可以提供一个更为自然的语法。
Operator overloading - overloading operator allows the DSL to provide a natural syntax.
函数重载和运算符重载的两种松软的东西——有许多面向对象的语言不支持这2种特征。
Function overloading and operator overloading are two such fluffy things - there are many OO languages that don't support those 2 features.
他在大多数情况下都是对的,我要这么说的原因是,通过运算符重载我可以,用一个通用的借口对。
The reason I say that is, by having operator overloading I can use 1 generic interface to all of the objects that I want to use.
如何正确地重载后缀增量运算符?
一方面为一个类重载运算符增加了代码的物流和可读性。
On one hand overloading operators for a class you have created can help with logistics and readability of code.
构造函数有三种情况,在重载赋值运算符时一定要分清楚。
As the construction function has three kinds of different conditions, assignment operator overriding must be given attention.
不能重载赋值运算符。
描述重载运算符的准则。
若要在自定义类中重载运算符,您需要在该类中创建具有正确签名的方法。
To overload an operator on a custom class requires creating a method on the class with the correct signature.
不能重载这些运算符。
不能在相等运算符的重载实现中使用默认相等运算符。
You cannot use the default equality operator in an overloaded implementation of the equality operator.
重载二元运算符时,也会隐式重载相应的赋值运算符(如果有)。
When a binary operator is overloaded, the corresponding assignment operator, if any, is also implicitly overloaded.
除赋值运算符外,重载运算符可由派生类继承下去。
Outside dividing assignment operation accord with, heavy carry calculates Fu Ke by derive kind successive go down.
除赋值运算符外,重载运算符可由派生类继承下去。
Outside dividing assignment operation accord with, heavy carry calculates Fu Ke by derive kind successive go down.
应用推荐