Explicit cast function -- both from and to types must be specified by the user and are statically ensured to be correct. This extra security can help prevent refactoring errors.
Usage:
int i; float f = castFrom!(int).to!(float)(i);
type to cast from
type to cast to
type of value being cast (statically checked to be == From)
value to be cast to type To
input parameter cast to type To
See Implementation
Explicit cast function -- both from and to types must be specified by the user and are statically ensured to be correct. This extra security can help prevent refactoring errors.
Usage: