I guess this is as designed, but I'll ask anyway.
http://dlang.org/operatoroverloading.html#Cast says an expression is
rewritten to opCast "whenever a bool result is expected".
This is true for
if(e) somethingElse
and e && somethingElse
, but not for other parts.
assert(cast(bool)e == true);
On Tuesday, January 03, 2012 17:41:12 simendsjo wrote:
> I guess this is as designed, but I'll ask anyway.
>
> http://dlang.org/operatoroverloading.html#Cast says an expression is
> rewritten to opCast "whenever a bool result is expected".
>
> This is true for
> if(e) somethingElse
> and e && som
On 01/04/2012 12:31 AM, Jonathan M Davis wrote:
On Tuesday, January 03, 2012 17:41:12 simendsjo wrote:
I guess this is as designed, but I'll ask anyway.
http://dlang.org/operatoroverloading.html#Cast says an expression is
rewritten to opCast "whenever a bool result is expected".
This is true f
On 01/03/2012 05:41 PM, simendsjo wrote:
I guess this is as designed, but I'll ask anyway.
http://dlang.org/operatoroverloading.html#Cast says an expression is
rewritten to opCast "whenever a bool result is expected".
This is true for
if(e) somethingElse
and e && somethingElse
, but not for ot
On Wednesday, January 04, 2012 00:35:20 Timon Gehr wrote:
> On 01/04/2012 12:31 AM, Jonathan M Davis wrote:
> > On Tuesday, January 03, 2012 17:41:12 simendsjo wrote:
> >> I guess this is as designed, but I'll ask anyway.
> >>
> >> http://dlang.org/operatoroverloading.html#Cast says an expression