castFrom

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);
template castFrom (
From
) {}

Members

Functions

to
To to(T value)

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.

Parameters

From

type to cast from

Meta