(ObjectRef) Added static_assert (Improved error message)
Former-commit-id: 11217f66e37fd6552d811298f7dacce940f894a3
This commit is contained in:
@@ -135,6 +135,8 @@ template<typename T>
|
|||||||
template<typename U>
|
template<typename U>
|
||||||
NzObjectRef<T>& NzObjectRef<T>::operator=(const NzObjectRef<U>& ref)
|
NzObjectRef<T>& NzObjectRef<T>::operator=(const NzObjectRef<U>& ref)
|
||||||
{
|
{
|
||||||
|
static_assert(std::is_convertible<U*, T*>::value, "U is not implicitly convertible to T");
|
||||||
|
|
||||||
Reset(ref.Get());
|
Reset(ref.Get());
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|||||||
Reference in New Issue
Block a user