mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Bug #1788: Fix rule-of-three violations inside the stable modules.
This fixes deprecated-copy warnings when compiling with GCC>=9 Also protect some additional Base-constructors from getting called by user code code (#1587)
This commit is contained in:
@@ -198,6 +198,9 @@ class QuaternionBase : public RotationBase<Derived, 3>
|
||||
#ifdef EIGEN_QUATERNIONBASE_PLUGIN
|
||||
# include EIGEN_QUATERNIONBASE_PLUGIN
|
||||
#endif
|
||||
protected:
|
||||
EIGEN_DEFAULT_COPY_CONSTRUCTOR(QuaternionBase)
|
||||
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(QuaternionBase)
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
@@ -304,12 +307,6 @@ public:
|
||||
m_coeffs = std::move(other.coeffs());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// And now because we declared a constructor, we don't get an implicit copy constructor. Say we want one.
|
||||
/** Default copy constructor */
|
||||
EIGEN_DEVICE_FUNC Quaternion(const Quaternion& other)
|
||||
: m_coeffs(other.coeffs())
|
||||
{}
|
||||
#endif
|
||||
|
||||
EIGEN_DEVICE_FUNC static Quaternion UnitRandom();
|
||||
|
||||
@@ -138,12 +138,6 @@ public:
|
||||
/** \returns the inverse translation (opposite) */
|
||||
Translation inverse() const { return Translation(-m_coeffs); }
|
||||
|
||||
Translation& operator=(const Translation& other)
|
||||
{
|
||||
m_coeffs = other.m_coeffs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const Translation Identity() { return Translation(VectorType::Zero()); }
|
||||
|
||||
/** \returns \c *this with scalar type casted to \a NewScalarType
|
||||
|
||||
Reference in New Issue
Block a user