struct X { int a; } X[1] x;
x[0] = {3}; or x[0] = {a:3}; fails;Should the syntax not extend to the case of array assignment? This avoids a double copy.
X y = {3}; works fine. So one has to do x[0] = y;
Brett via Digitalmars-d-learn Wed, 02 Oct 2019 10:40:39 -0700
struct X { int a; } X[1] x;
x[0] = {3}; or x[0] = {a:3}; fails;Should the syntax not extend to the case of array assignment? This avoids a double copy.
X y = {3}; works fine. So one has to do x[0] = y;