mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
use a more c++-ish way of preventing the compiler from generating default operator=
when it's not wanted. Thanks to Christian Mayer for the tip.
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
#ifndef EIGEN_DIFFERENCE_H
|
||||
#define EIGEN_DIFFERENCE_H
|
||||
|
||||
template<typename Lhs, typename Rhs> class Difference
|
||||
: public MatrixBase<typename Lhs::Scalar, Difference<Lhs, Rhs> >
|
||||
template<typename Lhs, typename Rhs> class Difference : NoDefaultOperatorEquals,
|
||||
public MatrixBase<typename Lhs::Scalar, Difference<Lhs, Rhs> >
|
||||
{
|
||||
public:
|
||||
typedef typename Lhs::Scalar Scalar;
|
||||
@@ -47,9 +47,6 @@ template<typename Lhs, typename Rhs> class Difference
|
||||
Difference(const Difference& other)
|
||||
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
|
||||
|
||||
// assignments are illegal but we still want to intercept them and get clean compile errors
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Difference)
|
||||
|
||||
private:
|
||||
const Difference& _ref() const { return *this; }
|
||||
int _rows() const { return m_lhs.rows(); }
|
||||
|
||||
Reference in New Issue
Block a user