import std.stdio; import std.array : staticArray;
void main() {
writeln([1].staticArray.sizeof); //4
writeln([2,5].staticArray.sizeof); //8
}
On Tue, Jun 18, 2019 at 2:30 PM lili via Digitalmars-d-learn <
[email protected]> wrote:
> Hi guys:
> Is the Dlang fix-length array alloc on stack? when a test
> writeln([1]).sizeof //16
> writeln([2]).sizeof //16
> Why, What is the fix-length array memory layout.
>
