Array of user's structs & slicing & opBinary
bearophile
bearophileHUGS at lycos.com
Sat Mar 8 14:30:39 PST 2014
Temtaime:
> Ok, with ints 2.065:
>
> http://dpaste.dzfl.pl/5057b6ce3ff8
>
> And git head says
> Error: Array operation a[] * 10 not implemented
This compiles:
void main() {
int[] a, b;
b[] = a[] * 10;
}
Also this:
void main() {
int[5] a;
int[5] b = a[] * 10;
}
In general D array ops are designed to not allocate memory. But I
think their design has some holes.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list