On Sat, 30 Apr 2022 18:17:25 +0700
Hairy Pixels via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:

>[...]
> So I wonder if the shorthand:
> 
>       generic THelper<T> = class helper for TMyClass

AFAIK it is planned for mode objfpc to support distinguishing types via
template count as in mode delphi:

type
  TMyClass = class
  end;
  generic TMyClass<T> = class
  end;
  generic TMyClass<S,T> = class
  end;

So you would need something similar for helpers:

  THelper = class helper for TMyClass
  end;
  generic THelper<T> = class helper for specialize TMyClass<T> 
  end;
  generic THelper<S,T> = class helper for specialize TMyClass<S,T> 
  end;


Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to