Skip to content

Commit e23b117

Browse files
authored
Merge pull request #1431 from pupil1337/fix-create-instance-func
Fix create instance func
2 parents d304f12 + 1fa7a9c commit e23b117

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/godot_cpp/core/class_db.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ class ClassDB {
203203
template <typename T, bool is_abstract>
204204
void ClassDB::_register_class(bool p_virtual, bool p_exposed, bool p_runtime) {
205205
static_assert(TypesAreSame<typename T::self_type, T>::value, "Class not declared properly, please use GDCLASS.");
206+
static_assert(!std::is_abstract_v<T> || is_abstract, "Class is abstract, please use GDREGISTER_ABSTRACT_CLASS.");
206207
instance_binding_callbacks[T::get_class_static()] = &T::_gde_binding_callbacks;
207208

208209
// Register this class within our plugin

0 commit comments

Comments
 (0)