www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9074] New: Can't use range functions with Appender


           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 puremagic.com
        ReportedBy: andrej.mitrovich gmail.com

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: -------
Nov 25 2012