[fpc-devel] class operator overloads
Sven Barth
pascaldragon at googlemail.com
Mon Jun 10 15:25:09 CEST 2019
Ryan Joseph <genericptr at gmail.com> schrieb am Mo., 10. Juni 2019, 14:28:
>
>
> > On Jun 10, 2019, at 3:13 AM, Sven Barth via fpc-devel <
> fpc-devel at lists.freepascal.org> wrote:
> >
> > A basic principle of operator overloads is that existing, internal
> operators are not overloadable. This principle won't be abandoned only
> because you want managed classes.
> >
>
> Existing internal operators? Sorry I don’t understand. The := operator is
> already overloadable but the left side isn’t passed in. Same goes for other
> binary operators where the destination variable is not passed it even
> though that could have been useful information.
>
The operator for assigning one class instance to another exists and is
internal thus it is not allowed to be overloaded.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190610/dca499fb/attachment.html>
More information about the fpc-devel
mailing list