Implicit Conversions in Struct Construction

Jonathan M Davis jmdavisProg at gmx.com
Thu Oct 18 21:04:03 PDT 2012


On Thursday, October 18, 2012 20:55:12 Ali Çehreli wrote:
> Explicit conversion works:
> 
>      return Fib(T(0), T(1));

Except that that won't work for int or other built-in types, because they lack 
constructors. What you need is std.conv.to.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list