Automatic static array length
Steven Schveighoffer
schveiguy at gmail.com
Wed Dec 26 22:41:32 UTC 2018
On 12/26/18 5:37 PM, Your Name wrote:
> On Wednesday, 26 December 2018 at 22:34:02 UTC, Steven Schveighoffer wrote:
>> auto arr = [12, 23, 54, 653, 2, 6432, 345, 435, 26].staticArray;
>
> How does this work?
It creates a static array from the given data, using the compiler's IFTI
engine to infer the length.
And no allocations should happen.
-Steve
More information about the Digitalmars-d
mailing list