[fpc-pascal] How to inline CompareFunc to Sort method in generic abstract class

Flávio Etrusco flavio.etrusco at gmail.com
Tue Nov 22 02:16:36 CET 2022


Em sáb., 19 de nov. de 2022 18:27, Sven Barth via fpc-pascal <
fpc-pascal at lists.freepascal.org> escreveu:

>  (...)
>
>    // this kind of constraint that uses T does not work yet
>    generic TList<T; Comparer: specialize TComparer<T>> = class
>      procedure Sort;
>    end;
>
> (...)
>

No? Sad, I use this all the time in Java.

Best regards,
Flávio


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20221121/a4f6d7eb/attachment.htm>


More information about the fpc-pascal mailing list