diff options
author | 2007-10-15 06:11:59 +0000 | |
---|---|---|
committer | 2007-10-15 06:11:59 +0000 | |
commit | d6f26dc8ebca424b5a0ecd583cc7da993be4e8ae (patch) | |
tree | 49d60723a702eb9469768cd28a99fa565a905659 /src/Core | |
parent | 884a718b0a2faad2e34cd916704cbc6c2a23550e (diff) |
clarify the situation with EI_INHERIT_ASSIGNMENT_OPERATORS
Diffstat (limited to 'src/Core')
-rw-r--r-- | src/Core/Conjugate.h | 2 | ||||
-rw-r--r-- | src/Core/Difference.h | 1 | ||||
-rw-r--r-- | src/Core/Identity.h | 3 | ||||
-rw-r--r-- | src/Core/Opposite.h | 1 | ||||
-rw-r--r-- | src/Core/Product.h | 1 | ||||
-rw-r--r-- | src/Core/Random.h | 3 | ||||
-rw-r--r-- | src/Core/ScalarMultiple.h | 1 | ||||
-rw-r--r-- | src/Core/Sum.h | 1 | ||||
-rw-r--r-- | src/Core/Zero.h | 3 |
9 files changed, 15 insertions, 1 deletions
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<typename MatrixType> class Conjugate Scalar _read(int row, int col) const { - return Conj(m_matrix.read(row, col)); + return NumTraits<Scalar>::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<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 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<typename MatrixType> 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<typename MatrixType> 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<typename Lhs, typename Rhs> 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<typename MatrixType> 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<typename MatrixType> 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<typename Lhs, typename Rhs> 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<typename MatrixType> 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; } |