[fpc-devel] class operator overloads

Sven Barth pascaldragon at googlemail.com
Mon Jun 10 15:31:15 CEST 2019


Ryan Joseph <genericptr at gmail.com> schrieb am Mo., 10. Juni 2019, 15:28:

>
>
> > On Jun 10, 2019, at 9:25 AM, Sven Barth via fpc-devel <
> fpc-devel at lists.freepascal.org> wrote:
> >
> > The operator for assigning one class instance to another exists and is
> internal thus it is not allowed to be overloaded.
> >
>
> Is that true for binary operators also? The same principle could apply to
> them also and perhaps solve the problem you posted below.
>

The +-operator is not defined internally thus it is allowed to be
overloaded. (is it really that hard to understand? If you can use an
operator in code without declaring an operator overload then this operator
is internal and not allowed to be overloaded).

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190610/3ba8a96e/attachment.html>


More information about the fpc-devel mailing list