W3cubDocs

/D

rt.cast_

Implementation of array assignment support routines.

License:
Boost License 1.0.
Authors:
Walter Bright, Sean Kelly
Object _d_toObject(void* p);

Given a pointer: If it is an Object, return that Object. If it is an interface, return the Object implementing the interface. If it is null, return null. Else, undefined crash

void* _d_interface_cast(void* p, ClassInfo c);

Attempts to cast Object o to class c. Returns o if successful, null if not.

© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/rt_cast_.html