_d_cast

fnvoid * _d_cast(To, From)(From o) @trusted

Hook that detects the type of cast performed and calls the appropriate function.

Parameters

oobject that is being casted
Totype to which the object is being casted

Returns

null if the cast fails, otherwise returns the object casted to the type To.