Function cpp_utils::dynamic_cast
[−]
[src]
pub unsafe fn dynamic_cast<R, T: DynamicCast<R>>(ptr: *const T) -> *const R
Converts type of a const pointer using DynamicCast
implementation of the type.
ptr
must be either a null pointer or a valid pointer to an instance of T
class
or a class derived from T
.
Returns null pointer if ptr
does not point to an instance of R
or an instance of
a class derived from R
.
If ptr
is null, this function does nothing and returns null pointer.