diff --git a/dtool/src/cppparser/cppArrayType.cxx b/dtool/src/cppparser/cppArrayType.cxx index 0226420aaf..ccdc9b1dfb 100644 --- a/dtool/src/cppparser/cppArrayType.cxx +++ b/dtool/src/cppparser/cppArrayType.cxx @@ -93,7 +93,21 @@ is_default_constructible() const { */ bool CPPArrayType:: is_copy_constructible() const { - return false; + // This is technically not exactly true, but array data members do not + // prevent C++ implicit copy constructor generation rules, so we need to + // return true here. + // If this is a problem, we will need to create a separate method for the + // purpose of checking copyability as a data member. + return true; +} + +/** + * Returns true if the type is copy-assignable. + */ +bool CPPArrayType:: +is_copy_assignable() const { + // Same story as is_copy_constructible. + return true; } /** diff --git a/dtool/src/cppparser/cppArrayType.h b/dtool/src/cppparser/cppArrayType.h index a0ca28680d..7668950620 100644 --- a/dtool/src/cppparser/cppArrayType.h +++ b/dtool/src/cppparser/cppArrayType.h @@ -42,6 +42,7 @@ public: virtual bool is_trivial() const; virtual bool is_default_constructible() const; virtual bool is_copy_constructible() const; + virtual bool is_copy_assignable() const; virtual bool is_equivalent(const CPPType &other) const; virtual void output(std::ostream &out, int indent_level, CPPScope *scope,