diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2019-12-19 17:30:11 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2019-12-19 17:30:11 +0100 |
commit | 870e53c0f2d13c27d16fec05e6d9bde2ff0f5604 (patch) | |
tree | d203fec95c8983553f513521b4d5df1310034802 /Eigen/src/Geometry/Quaternion.h | |
parent | 6965f6de7fec13f29ad95713a031c520efd3265c (diff) |
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)
Diffstat (limited to 'Eigen/src/Geometry/Quaternion.h')
-rw-r--r-- | Eigen/src/Geometry/Quaternion.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 73b28ae34..7b2c4d89d 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -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(); |