Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1445

Use operator overloading for classes with non-ARC compiler · GitHub

$
0
0

[WayBackUse operator overloading for classes with non-ARC compiler · GitHub

The trick: do not use class operator but use class function &&op_ with the special operator name in the table referenced below. Just follow the bulleted example links to get an idea.

Bonus: it works on class helper constructs as well.

Officially this unsupported and with the non-ARC compiler you will have a risk of memory leaks.

But it’s so much fun as these links prove:

The usual operator gotchas apply here as well: Delphi operator overloading: table of operators, names, and some notes on usage and ‘glitches’.

The operators you could try: [WayBackOperator Overloading (Delphi) – RAD Studio

Oh, this thread needs some change now: [WayBackList of Delphi language features and version in which they were introduced/deprecated – Stack Overflow

–jeroen


Viewing all articles
Browse latest Browse all 1445

Trending Articles