Array Copying syntax

Antonio Corbi via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 16 10:03:20 PDT 2016


Hi!

I was just playing with array initialization and copying and 
discovered that this syntax works as expected but it is not 
referenced under https://dlang.org/spec/arrays.html#array-copying:

-----8><-----
int[3] s;
int[3] t;

s = t;
-----8><-----

Is it safe to use or do I have to use the proposed 's[] = t;' or 
's[] = t[]' ?
Thank's!


More information about the Digitalmars-d-learn mailing list