Den 01-09-2011 05:19, David Nadlinger skrev:
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

Ok. You can do it in C++. I wonder what this has not been allowed in D?

/Jonas

Reply via email to