[Issue 9074] New: Can't use range functions with Appender
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 25 08:14:36 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9074
Summary: Can't use range functions with Appender
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-11-25 08:14:35 PST ---
import std.array;
import std.range;
void main()
{
// Error: casting string to char is deprecated
// Error: static assert "Cannot put a dchar into a Appender!(string)"
Appender!string x;
x.put(repeat(" ").take(4));
// Error: casting string to dchar is deprecated
Appender!dstring y;
y.put(repeat(" ").take(4));
}
It forces us to use `replicate`, which does allocation.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list