In uGenerics I have two lists. 1 for Data Structures and 1 for Objects.

If I place this statement in declarations for a system that handles an
Int64 List...

     GInt64List=specialize GStructList<Int64>;

... then I get

C:\Developer\Source\Libraries\Core\uInt64Array.pas(54,17) Error:
Forward declaration not solved "GStructList$Int64.Empty(var Int64);"

For the most part I want to have a generic case for data structures
with the list object handling init, copy,empty,and done methods for
the elements.

I am using FPC from today's trunk and wanted to know if there is
something wrong with generics that I can't use abstract methods for my
generic and just populate the methods "AFTER" I specialize...

  GInt64List=specialize GStructList<Int64>;

  TInt64List=Class(GInt64List)
  public
    procedure Empty(Var Item:Int64); override;
    procedure Done(Var Item:Int64);override;
    procedure Init(Var Item:Int64);override;
  end;

I'm getting compiler errors b/c abstractions ... The way I've used
generics in FPC is that I preface my generic types with "G"... Then I
descend from that class the actual class I want to use.

Can the current FPC be worked to make this happen or do I need to
submit a report?

Attachment: uGenerics.pas
Description: Binary data

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to