Discussion:
Error: cannot implicitly convert expression
Suliman via Digitalmars-d-learn
2014-10-23 19:07:08 UTC
Permalink
import std.stdio;
import std.conv;
import std.string;
import std.net.curl;

void main()
{
string content = get("d-lang.appspot.com/testUrl2");
}



Error: cannot implicitly convert expression (get("d-lang.appsp
ot.com/testUrl2", AutoProtocol())) of type char[] to string


code from: http://dlang.org/phobos/std_net_curl.html#get
Suliman via Digitalmars-d-learn
2014-10-23 19:18:32 UTC
Permalink
Solution
http://forum.dlang.org/thread/***@forum.dlang.org#post-l639dt:24vlj:241:40digitalmars.com

Am I right understand that it's bug in doc?
Jonathan M Davis via Digitalmars-d-learn
2014-10-23 21:22:32 UTC
Permalink
Post by Suliman via Digitalmars-d-learn
Solution
Am I right understand that it's bug in doc?
It certainly looks like one. std.net.curl's documentation
examples aren't generally generated with ddoc-ed unittest blocks
(because that would require hitting sites on the internet), so
its examples are more likely to be buggy than is the case with
many other modules.

- Jonathan M Davis

Continue reading on narkive:
Loading...