https://issues.dlang.org/show_bug.cgi?id=23724

          Issue ID: 23724
           Summary: HTTP.onReceive example does not compile
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: [email protected]
          Reporter: [email protected]

The following example from the documentation of std.net.curl.HTTP.onReceive
does not compile:

---
import std.net.curl, std.stdio;
auto client = HTTP("dlang.org");
client.onReceive = (ubyte[] data)
{
    writeln("Got data", to!(const(char)[])(data));
    return data.length;
};
client.perform();
---

The error message is:

---
Error: template instance `to!(const(char)[])` template `to` is not defined
---

--

Reply via email to