Op 2021-01-11 om 15:26 schreef Benito van der Zander via fpc-pascal:
Hi,
perhaps a safe, generic function for this copying could be added to
the RTL. Like:
Procedure ManagedMove<T>(const source: T;var dest: T;count: SizeInt);
a) For non-managed types it would be the same as Move(source, dest,
count*sizeof(T))
Then you want to simply use ismanagedtype and move(). Moving the move()
to a separate generic procedure will only lead to many instantiations of
what is basically a move() procedure.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal