overload of array operations
Jay Norwood
jayn at prismnet.com
Fri Oct 14 12:11:19 PDT 2011
Jonathan M Davis Wrote:
> On Friday, October 14, 2011 11:30:25 Jay Norwood wrote:
> > Is it possible to overload array operations
>
> Please be more specific. Are you asking whether a struct or class can overload
> the indexing and slicing operators? If so, the answer is yes.
>
> http://d-programming-language.org/operatoroverloading.html
>
> - Jonathan M Davis
I'm interested, for example, in overloading the + operation for arrays that is documented to generate a vector add operation. I assume there would need to be a name for that operation in order to overload it.
Thanks,
Jay
More information about the Digitalmars-d-learn
mailing list