mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
cppparser: fix class with array member not seen as copy-constructible
This commit is contained in:
parent
acac93a1d1
commit
fa6d8b4b39
@ -93,7 +93,21 @@ is_default_constructible() const {
|
|||||||
*/
|
*/
|
||||||
bool CPPArrayType::
|
bool CPPArrayType::
|
||||||
is_copy_constructible() const {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
virtual bool is_trivial() const;
|
virtual bool is_trivial() const;
|
||||||
virtual bool is_default_constructible() const;
|
virtual bool is_default_constructible() const;
|
||||||
virtual bool is_copy_constructible() const;
|
virtual bool is_copy_constructible() const;
|
||||||
|
virtual bool is_copy_assignable() const;
|
||||||
virtual bool is_equivalent(const CPPType &other) const;
|
virtual bool is_equivalent(const CPPType &other) const;
|
||||||
|
|
||||||
virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
|
virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user