[fpc-pascal] Operator overloading and generic class
xrfang at gmail.com
Tue Aug 26 10:17:10 CEST 2014
While I try to compile this code:
TIntTree = class(specialize TTree<Integer>)
TITTree = class(specialize TTree<TIntTree>)
operator <(it1, it2: TIntTree): Boolean;
Result := it1.Data < it2.Data;
I got the following error:
tree.pas(324,11) Error: Operator is not overloaded: "TIntTree" < "TIntTree"
The complete code for tree.pas is here:
Even I defined the needed operator like above, it still refuse to compile.
How to solve this?
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal