[Issue 18152] New: std.format.formatteedRead should work with rvalues.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 2 20:53:01 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18152
Issue ID: 18152
Summary: std.format.formatteedRead should work with rvalues.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
The following code should work:
-----
string[int] aa1;
formattedRead!("%s")(`[1:"hello", 2:"world"]`, aa1);
assert(aa1 == [1:"hello", 2:"world"]);
int[string] aa2;
formattedRead(`{"hello"=1; "world"=2}`, "{%(%s=%s; %)}", aa2);
assert(aa2 == ["hello":1, "world":2]);
-----
--
More information about the Digitalmars-d-bugs
mailing list