Warning: explicit element-wise assignment (this.vector)[] = vec.vector[cast(ulong)0..cast(ulong)dimension]
bearophile
bearophileHUGS at lycos.com
Mon Jun 24 07:30:19 PDT 2013
David:
> Why does dmd produce this warning? (this is new in 2.063) Why is
> assigning elementwise better?
The short answer is: do as the compiler suggests you, and be very
happy the compiler avoids you some bugs.
The explanation is longer. In brief, it's much better to avoid
some bugs and to make the D semantics more clear, to denote all
vector ops, including the assignment with a [].
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list