[Issue 13797] std.array.extend
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 31 15:07:09 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=13797
Seb <greensunny12 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |greensunny12 at gmail.com
--- Comment #1 from Seb <greensunny12 at gmail.com> ---
Hmm. Why can't we handle this on a language level?
---
int[] arr;
arr ~= [0, 1, 2];
---
works fine. So I don't see any reason why the compiler couldn't be improved to
accept this too:
---
int[] arr;
arr ~= 3.iota;
---
Custom data types can already do this with operator overloading, but built-in
arrays can't.
I submitted an enhancement request:
https://issues.dlang.org/show_bug.cgi?id=18699
--
More information about the Digitalmars-d-bugs
mailing list