to Fix #1425
When I want to register a non abstract class, I will use GDREGISTER_CLASS() or other macros, But I registered the abstract class through GDREGISTER_CLASS() (possibly because forgot to implement the pure virtual methods), and there were no compilation errors, which would give me some misunderstandings.
It is because if constexpr (!std::is_abstract_v<T>) determined that this class is an abstract class and did not compile memnew(T).
May necessary to confirm that when using GDREGISTER_CLASS(), the memnew(T) must compile. Therefore, when I mistakenly register an abstract class by GDREGISTER_CLASS(), the compiler will give error message.
This PR has been messed up by multiple commits, and the branch is also my master branch. I plan to delete this PR and create a new branch for this modification
to Fix #1425 When I want to register a non abstract class, I will use
GDREGISTER_CLASS()
or other macros, But I registered the abstract class throughGDREGISTER_CLASS()
(possibly because forgot to implement the pure virtual methods), and there were no compilation errors, which would give me some misunderstandings.It is because
if constexpr (!std::is_abstract_v<T>)
determined that this class is an abstract class and did not compilememnew(T)
.May necessary to confirm that when using GDREGISTER_CLASS(), the
memnew(T)
must compile. Therefore, when I mistakenly register an abstract class byGDREGISTER_CLASS()
, the compiler will give error message.