Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-30 Thread Flávio Etrusco via fpc-pascal
Hi, Em sáb., 30 de abr. de 2022 às 09:13, Mattias Gaertner via fpc-pascal escreveu: > > AFAIK it is planned for mode objfpc to support distinguishing types via > template count as in mode delphi: > > type > TMyClass = class > end; > generic TMyClass = class > end; > generic TMyClass = c

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

2022-11-18 Thread Flávio Etrusco via fpc-pascal
Em seg., 14 de nov. de 2022 15:26, Vojtěch Čihák via fpc-pascal < fpc-pascal@lists.freepascal.org> escreveu: > Hi, > > I wrote a generic abstract class - a list based on dynamic array (i.e. > array of T;) and this class can be specialized elsewhere with any type > (records or classes). > Part of t

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

2022-11-21 Thread Flávio Etrusco via fpc-pascal
; > begin > > Result:=(BRec.A-ARec.A); > > end; > > > > the results are: > > 750ms inlined > > 950ms not inlined, ~21% slower > > 835ms when compare func. is a parameter ~10% slower > > > > so the gain of inlining is higher for sorting primitive types. > V. > > __

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

2022-11-21 Thread Flávio Etrusco via fpc-pascal
Em sáb., 19 de nov. de 2022 18:27, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> escreveu: > (...) > >// this kind of constraint that uses T does not work yet >generic TList> = class > procedure Sort; >end; > > (...) > No? Sad, I use this all the time in Java. Be

Re: [fpc-pascal] client certificate mandatory and verification

2024-04-09 Thread Flávio Etrusco via fpc-pascal
Hello, This doesn't seem to have an easy solution right now. Many of the functions needed to set up openssl for this doesn't even seem to have imports in the FPC package. You'd then have to import the functions and implement a custom TSSLSocketHandler, and then hook it using either (fphttpapp.)App