[Issue 13797] std.array.extend

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13797

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 13797] std.array.extend

2018-03-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13797

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com

--- Comment #1 from Seb  ---
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

--