> On Jun 3, 2018, at 3:15 PM, Sven Barth via fpc-pascal
> <[email protected]> wrote:
>
> Because operator overloads are static methods not normal methods.
I don’t understand. Why aren’t both those variants possible? They’re both
static I believe. The first is mutating the left side value and the second is a
clone (the most common operation for += )
class operator + (var left: TIntArray; const right: T);
class operator + (constref left: TIntArray; const value: T): TIntArray;
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal