(ObjectRef) Added static_assert (Improved error message)
Former-commit-id: 11217f66e37fd6552d811298f7dacce940f894a3
This commit is contained in:
parent
7a73314ef5
commit
e82eccecfd
|
|
@ -135,6 +135,8 @@ template<typename T>
|
|||
template<typename U>
|
||||
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());
|
||||
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue