program moi;
{$mode objfpc}
    uses fgl;
    type
        tSI= specialize tFpGMap<integer, tObject>;
        // tIS= specialize tFpGMap<tObject, integer>;
begin
end.

Hi,
I'm trying to use template in fpc 2.6.0. I can map class type as value as above 
code can be compiled. But if I uncomment the declaration of tIS -- map class 
type as key, fpc fail to compile and print out these error msgs:

Error: Operator is not overloaded: "TObject" < "TObject"
Error: Operator is not overloaded: "TObject" > "TObject"
t.pas(10) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not 
specify a source file to be compiled)

Any way to resolve it?
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to