Generic type helper

Thomas Kurz via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
Hello,

a quick question: how do I define a generic type helper?

Example:

type generic TArray<T> = array of T;
type generic TArrayHelper<T> = type helper for TArray
  function Count: Cardinal;
  function Contains (AItem: T): Boolean;
end;

This doesn't work, but I don't know how to do it properly.

Thanks,
Thomas  

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.