Luna::Ref::Ref
template <typename _Rty, typename _Enable>
Ref(_Rty *ptr)
Constructs one reference using the native pointer of one different type.
The assignment will fail if the new pointer is nullptr
or cannot be casted to _Ty
. If the assignment fails, this reference will be null after this operation. If the assignment succeeds, The strong reference counter of the new boxed object will be increased.
Parameters
-
in ptr
The native pointer to set.