Godot Engine – Multi-platform 2D and 3D game engine
Ensure that T is a complete type before using `Ref<T>::operator Variant()`
nikitalitaf34e80ee82f4
diff --git a/core/object/ref_counted.h b/core/object/ref_counted.hindex 3adc21192f5..c0e5c65ef7d 100644--- a/core/object/ref_counted.h+++ b/core/object/ref_counted.h@@ -127,6 +127,7 @@ public:}operator Variant() const {+ static_assert(std::is_base_of_v<RefCounted, T>, "T is not a RefCounted type or is an incomplete type.");return Variant(reference);}