Obtain pointer from static array literal

russhy russhy at gmail.com
Fri Oct 8 14:07:27 UTC 2021


https://run.dlang.io/is/S8uMbp


It's such a shame that ``[0,1,2,3].ptr`` allocates using GC, even 
if using ``func(scope const void* ptr)``


Can't something be done to make this ``[0,1,2,3]`` a static array 
literal?

Who thought making it GC allocated was a good idea? i want names!


More information about the Digitalmars-d-learn mailing list