Yao G. Wrote:

> That's a bug. The return value should be CheckedInt(result);

I'll add that to the errata.


Yao G. Wrote:

> 
> http://www.digitalmars.com/d/2.0/mixin.html

I wasn't refering to the mixin, but the call to CheckedInt(). mixin compiles 
"value" ~ op ~ "rhs.value", which in this case evaluates to 5 + 5 and the whole 
call becomes CheckedInt(10). 

What I don't understand is how you can construct a new CheckedInt struct by 
calling it with CheckedInt(10), when I have to use a call like 
CheckedInt!(int)(10) outside the struct (in main or in a unittest block).

Reply via email to