Convert TickDuration to Duration?

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Jun 9 11:10:40 PDT 2011


On 6/9/11, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> What I mean is, whenever you use the blunt instrument 'cast' anything can
> happen.  This code:
>
> cast(x)y;
>
> can do a lot of damage, depending on what x and y are.

This was on my mind since I've seen it in std.datetime, and I agree.
Isn't it possible for std.conv.to to check if there's a to() function
defined in a struct/class and then use that?


More information about the Digitalmars-d-learn mailing list