From e82eccecfd1bdf31ae5fdceb0742a246d92610bf Mon Sep 17 00:00:00 2001 From: Lynix Date: Thu, 29 Jan 2015 11:46:11 +0100 Subject: [PATCH] (ObjectRef) Added static_assert (Improved error message) Former-commit-id: 11217f66e37fd6552d811298f7dacce940f894a3 --- include/Nazara/Core/ObjectRef.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/Nazara/Core/ObjectRef.inl b/include/Nazara/Core/ObjectRef.inl index febc2d528..cf15229d6 100644 --- a/include/Nazara/Core/ObjectRef.inl +++ b/include/Nazara/Core/ObjectRef.inl @@ -135,6 +135,8 @@ template template NzObjectRef& NzObjectRef::operator=(const NzObjectRef& ref) { + static_assert(std::is_convertible::value, "U is not implicitly convertible to T"); + Reset(ref.Get()); return *this;