Is "auto t=T();" not the same as "T t;"?
Ali Çehreli
acehreli at yahoo.com
Tue Oct 25 20:27:18 UTC 2022
On 10/25/22 13:12, Paul Backus wrote:
> In order to create a copy of a static array
Although .dup works for static arrays as well, you meant "dynamic array"
and everyones knows it. :)
> with its own block of
> memory, separate from the original, you have to use the built-in `.dup`
> method:
>
> ```d
> int[] a = [1];
> int[] b = a.dup;
Ali
More information about the Digitalmars-d-learn
mailing list