According to the docs, both:
"Classes and structures can provide their own implementations of existing operators. This is known as overloading the existing operators."
and
"You can declare and implement your own custom operators in addition to the standard operators provided by Swift. Custom operators can be defined only with the characters / = - + * % < > ! & | ^ . ~ ."
Source:
-mgcm
New operators or operator overloading? The latter is one of the things I most miss from C++.
On 6/4/14 10:51 AM, "email@hidden" <email@hidden> wrote:
Given that Swift apparently allows the invention of new operators (I haven't read that far in the book yet), there's no reason not to add your own pair of operators that work the way you want.
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|