Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-18 Thread Sven Barth
Am 18.03.2015 11:52 schrieb "Maciej Izak" : > > 2015-03-17 23:35 GMT+01:00 Sven Barth : >> >> I won't commit it as long as I haven't made sure that it doesn't rely on any implementation details. And that needs time... > > > IMO the most important to fix is: > > http://bugs.freepascal.org/view.php?i

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-18 Thread Maciej Izak
2015-03-17 23:35 GMT+01:00 Sven Barth : > I won't commit it as long as I haven't made sure that it doesn't rely on > any implementation details. And that needs time... > IMO the most important to fix is: http://bugs.freepascal.org/view.php?id=24848 http://bugs.freepascal.org/view.php?id=25607 R

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-18 Thread denisgolovan
> https://github.com/dathox/generics.collections Thanks. Git makes life easier. -- Regards, Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-17 Thread Sven Barth
Am 17.03.2015 21:08 schrieb "Maciej Izak" : > > 2015-03-16 14:15 GMT+01:00 denisgolovan : >> >> BTW, could you upload it to GitHub to be able to pull new changes easier? >> It looks like it will be a long way to official FPC package. > > > Right :D, maybe FPC team don't need Generics.* :O > > https

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-17 Thread Maciej Izak
2015-03-16 14:15 GMT+01:00 denisgolovan : > BTW, could you upload it to GitHub to be able to pull new changes easier? > It looks like it will be a long way to official FPC package. Right :D, maybe FPC team don't need Generics.* :O https://github.com/dathox/generics.collections Regards, Maciej

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-16 Thread denisgolovan
> Alternatively you can use THashMap from Generics.Collections -> this > implementation don't need any operators overloading, will work with most of > FreePascal types and it is much, much faster :) Yes. I saw your library. Looks promising, but I am a bit concerned about amount of bugs related t

Re: [fpc-pascal] fgl.TFPGMap / operator not overloaded for object types

2015-03-16 Thread Maciej Izak
Alternatively you can use THashMap from Generics.Collections -> this implementation don't need any operators overloading, will work with most of FreePascal types and it is much, much faster :) http://bugs.freepascal.org/view.php?id=27206 (download generics_collections_final.zip -> http://bugs.free

Re: [fpc-pascal] fgl.TFPGMap

2011-01-21 Thread Alex Shishkin
21.01.2011 3:07, Paul Ishenin пишет: 21.01.2011 0:28, Alex Shishkin wrote: Following code causes error "Operator is not overloaded: "TObject" < "TObject"" How to make it work? program generictest2; {$mode objfpc}{$H+} uses fgl; operator < (a: TObject; b: TObject): boolean; begin result :=

Re: [fpc-pascal] fgl.TFPGMap

2011-01-20 Thread Paul Ishenin
21.01.2011 0:28, Alex Shishkin wrote: Following code causes error "Operator is not overloaded: "TObject" < "TObject"" How to make it work? program generictest2; {$mode objfpc}{$H+} uses fgl; operator < (a: TObject; b: TObject): boolean; begin result := PtrInt(a) < PtrInt(b); end; type TMy

Re: [fpc-pascal] fgl.TFPGMap

2011-01-20 Thread Honza
2011/1/20 Alex Shishkin : > As I understand problem is in the compiler. It cant use overloaded operator > if it was defined after generic. AFAIK exactly that is the problem and that's why TFPGMap can't cope with some types. >> You can take a look on this container lib, which might be helpful for y

Re: [fpc-pascal] fgl.TFPGMap

2011-01-20 Thread Alex Shishkin
20.01.2011 22:18, Honza пишет: 2011/1/20 Alex Shishkin: Following code causes error "Operator is not overloaded: "TObject"< "TObject"" How to make it work? program generictest2; {$mode objfpc}{$H+} uses fgl; operator< (a: TObject; b: TObject): boolean; begin result := PtrInt(a)< PtrInt(b)

Re: [fpc-pascal] fgl.TFPGMap

2011-01-20 Thread Honza
2011/1/20 Alex Shishkin : > Following code causes error "Operator is not overloaded: "TObject" < > "TObject"" > How to make it work? > > program generictest2; > {$mode objfpc}{$H+} > uses >  fgl; > operator < (a: TObject; b: TObject): boolean; > begin >  result := PtrInt(a) < PtrInt(b); > end; > ty