The following code consumes too much memory (over 16GB).
It happens when using DMD v2.065-devel-5ffe893 on Linux 64bit.
----
import std.csv;
import std.array;
import std.algorithm;
void main() {
enum x = "a,b,c\nd,e,f";
enum r = csvReader!string(x);
static assert(r.map!"a.array".array);
}
----
Comment #1 by bugzilla — 2019-12-04T15:25:28Z
Meanwhile I get
test.d(7): Error: variable `test.main.r` : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
static const doesn't work either:
/usr/include/dmd/phobos/std/range/primitives.d(2258): Error: non-constant expression ",b,c\x0ad,e,f"[]
Comment #2 by robert.schadek — 2024-12-01T16:20:17Z