Bug 12275 – csvReader and static assert consumes too much memory

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-27T17:45:35Z
Last change time
2024-12-01T16:20:17Z
Assigned to
No Owner
Creator
Tomoya Tanjo
Moved to GitHub: phobos#10034 →

Comments

Comment #0 by ttanjo — 2014-02-27T17:45:35Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10034 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB