Can I overload an operator in Objective-C?

后端 未结 7 573
萌比男神i
萌比男神i 2020-12-15 15:02

Is it possible to override operator use in Objective-C?

For example

myClassInstance + myClassInstance

calls a custom function to ad

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 15:34

    No, Objective-C does not support operator overloading.

提交回复
热议问题