unstd.casts

Type casting functions.

Functions from this module are intended to be used instead of build-in cast as they provide safer and richer interface.

Members

Enums

typesDowncastable
eponymoustemplate typesDowncastable(To, From)

Functions for class/interface dynamic casting.

typesDynamicCastable
eponymoustemplate typesDynamicCastable(To, From)
typesUpcastable
eponymoustemplate typesUpcastable(To, From)

Functions for class/interface dynamic casting.

Functions

_d_dynamic_cast
inout(void)* _d_dynamic_cast(inout(void)* p, ClassInfo c)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_d_interface_cast
inout(void)* _d_interface_cast(inout(void)* p, ClassInfo c)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Properties

downcast
inout(To) downcast [@property getter]
downcastable
bool downcastable [@property getter]
dynamicCast
inout(To) dynamicCast [@property getter]
dynamicCastable
bool dynamicCastable [@property getter]
fromRawPtr
inout(To) fromRawPtr [@property getter]
toRawPtr
inout(void)* toRawPtr [@property getter]
tryDowncast
inout(To) tryDowncast [@property getter]
tryDynamicCast
inout(To) tryDynamicCast [@property getter]
upcast
inout(To) upcast [@property getter]

Functions for class/interface dynamic casting.

viewAs
inout(To) viewAs [@property getter]

Function allowing "blind" casting to any type of the same size.

Meta

Authors

Denis Shelomovskij