https://issues.dlang.org/show_bug.cgi?id=24570
Salih Dincer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Salih Dincer <[email protected]> --- (In reply to Steven Schveighoffer from comment #1) > A further note is that an array of arrays is not consumed when printed -- > because formatValue has a specialized case for that. If you do the following instead of `auto save() => return this;`, the problem is solved: ``` struct R { wchar* ptr; size_t len; this(T)(T[] range) { ptr = cast(wchar*)range.ptr; len = range.length; } auto empty() => len == 0; auto front() => *ptr++; auto popFront() => len--; auto save() { auto r = R([]); r.len = len; r.ptr = ptr; return r; } } void main() { auto c = ['€', '₺', '₽']; auto r = R(c); auto arr = [r, r, r]; assert(!arr.empty); import std.conv : text; auto str = arr.text; // "€₺₽" assert(!arr.empty); } ``` --
