diff --git a/src/Core/Conjugate.h b/src/Core/Conjugate.h index dae265953..6061fab03 100644 --- a/src/Core/Conjugate.h +++ b/src/Core/Conjugate.h @@ -51,7 +51,7 @@ template class Conjugate Scalar _read(int row, int col) const { - return Conj(m_matrix.read(row, col)); + return NumTraits::conj(m_matrix.read(row, col)); } protected: diff --git a/src/Core/Difference.h b/src/Core/Difference.h index 6184090fc..9800bdcd6 100644 --- a/src/Core/Difference.h +++ b/src/Core/Difference.h @@ -47,6 +47,7 @@ template 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 EI_INHERIT_ASSIGNMENT_OPERATORS(Difference) private: diff --git a/src/Core/Identity.h b/src/Core/Identity.h index e6f7cdd5e..cdd38ada7 100644 --- a/src/Core/Identity.h +++ b/src/Core/Identity.h @@ -42,6 +42,9 @@ template class Identity assert(RowsAtCompileTime == ColsAtCompileTime); } + // assignments are illegal but we still want to intercept them and get clean compile errors + EI_INHERIT_ASSIGNMENT_OPERATORS(Identity) + private: Identity& _ref() { return *this; } const Identity& _ref() const { return *this; } diff --git a/src/Core/Opposite.h b/src/Core/Opposite.h index 06d77c767..ea7533dfd 100644 --- a/src/Core/Opposite.h +++ b/src/Core/Opposite.h @@ -42,6 +42,7 @@ template class Opposite Opposite(const Opposite& other) : m_matrix(other.m_matrix) {} + // assignments are illegal but we still want to intercept them and get clean compile errors EI_INHERIT_ASSIGNMENT_OPERATORS(Opposite) private: diff --git a/src/Core/Product.h b/src/Core/Product.h index 854816a71..1937b5182 100644 --- a/src/Core/Product.h +++ b/src/Core/Product.h @@ -82,6 +82,7 @@ template class Product Product(const Product& 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 EI_INHERIT_ASSIGNMENT_OPERATORS(Product) private: diff --git a/src/Core/Random.h b/src/Core/Random.h index f4e301f4f..18c6d483b 100644 --- a/src/Core/Random.h +++ b/src/Core/Random.h @@ -40,6 +40,9 @@ template class Random { assert(rows > 0 && cols > 0); } + + // assignments are illegal but we still want to intercept them and get clean compile errors + EI_INHERIT_ASSIGNMENT_OPERATORS(Random) private: const Random& _ref() const { return *this; } diff --git a/src/Core/ScalarMultiple.h b/src/Core/ScalarMultiple.h index 060adf185..760d15d67 100644 --- a/src/Core/ScalarMultiple.h +++ b/src/Core/ScalarMultiple.h @@ -43,6 +43,7 @@ template class ScalarMultiple ScalarMultiple(const ScalarMultiple& other) : m_matrix(other.m_matrix), m_scalar(other.m_scalar) {} + // assignments are illegal but we still want to intercept them and get clean compile errors EI_INHERIT_ASSIGNMENT_OPERATORS(ScalarMultiple) private: diff --git a/src/Core/Sum.h b/src/Core/Sum.h index 49968c238..d6cd15488 100644 --- a/src/Core/Sum.h +++ b/src/Core/Sum.h @@ -47,6 +47,7 @@ template class Sum Sum(const Sum& 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 EI_INHERIT_ASSIGNMENT_OPERATORS(Sum) private: diff --git a/src/Core/Zero.h b/src/Core/Zero.h index ca599c937..9ee9776b9 100644 --- a/src/Core/Zero.h +++ b/src/Core/Zero.h @@ -41,6 +41,9 @@ template class Zero assert(rows > 0 && cols > 0); } + // assignments are illegal but we still want to intercept them and get clean compile errors + EI_INHERIT_ASSIGNMENT_OPERATORS(Zero) + private: const Zero& _ref() const { return *this; } int _rows() const { return m_rows; }