[fpc-pascal] Generic TFPGList<Record Type> gives me compiler error: Operator is not overloaded

Dennis Poon dennis at avidsoft.com.hk
Tue Sep 17 17:39:02 CEST 2013


Sven,

Thanks a lot. It worked.

Generics, advanced record, customized operator ... all these new 
features are so cool.
I am impressed that Free Pascal has become so powerful.

Dennis


uses fgl;
>>
>> Type
>>    RScene=record
>>      ID : Word;
>>      Name, Category : String;
>>    end;
>>
>>    TSceneList=specialize TFPGList<RScene>;
>>
>>
>> The error is:  Operator is not overloaded: "RScene" = "RScene"
>>
>>
>> I suppose the generic thing does not know how to compare 2 records.
>> How do I solve that?
>
> Provide a "=" operator overload for the record:
>
>





More information about the fpc-pascal mailing list