Luna::Ref::operator _Ty *

operator _Ty *() const

Gets the boxed object casted to _Ty.

This call does not modify the reference counter of the object.

Return value

Returns the interface or object pointer of the boxed object. Returns nullptr if the reference is not valid.

Remark

Note that the pointer returned by get may not equal to the pointer returned by object due to interface vtable offsetting. When you perform typeless object operations like increasing/decreasing reference counters, casting types using RTTI, etc, always call object on this reference or Interface::get_object on the interface pointer to get object pointer.