Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   As Delphi generics are not supported for free functions, wrap them in a record contai (https://www.delphipraxis.net/195073-delphi-generics-not-supported-free-functions-wrap-them-record-contai.html)

DP News-Robot 31. Jan 2018 05:13

As Delphi generics are not supported for free functions, wrap them in a record contai
 
Of the things not possible with generics in Delphi, I already wrote about*Impossible: Property using Generics in Delphi. Now it’s time to write about simulating a free function with generics as this is impossible: function CreateManaged<T>(const value: T): IManaged<T>; Usually I create a static record method for these, as records do not have VMT overhead, […]

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:00 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz