etc.curl: Formal review begin
David Nadlinger
see at klickverbot.at
Wed Aug 31 20:19:20 PDT 2011
On 8/25/11 12:05 PM, Jonas Drewsen wrote:
> Actually would adding opCast!string() and opCast!(ubyte[])() to
> AsyncResult and Result allow for this?:
>
> string content = Http.get("http://mysite.com/form.cgi");
> or
> ubyte[] content = Http.get("http://mysite.com/form.cgi");
It wouldn't, opCast is only taken into account for explicit casts
(if(something) is considered an explicit cast to bool). For this to
work, you would have to use alias this, but currently you could only
provide one of the two conversions.
David
More information about the Digitalmars-d
mailing list