aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 11:07:12 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 11:07:12 +0200
commit74cf12cbe0949852197260dc8dcdd0da61f09736 (patch)
tree2880b47c860b2361c3021b6f5a63dfadb2d28522 /Eigen
parentd5e0efaf6930a588dbc6a3f4e047a9d4977eab34 (diff)
add a compile time error if someone call packet on Diagonal (instead of infinite runtime loop)
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/Diagonal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h
index b72ce93fa..a77710565 100644
--- a/Eigen/src/Core/Diagonal.h
+++ b/Eigen/src/Core/Diagonal.h
@@ -125,6 +125,9 @@ template<typename MatrixType, int DiagIndex> class Diagonal
EIGEN_STRONG_INLINE Index absDiagIndex() const { return m_index.value()>0 ? m_index.value() : -m_index.value(); }
EIGEN_STRONG_INLINE Index rowOffset() const { return m_index.value()>0 ? 0 : -m_index.value(); }
EIGEN_STRONG_INLINE Index colOffset() const { return m_index.value()>0 ? m_index.value() : 0; }
+ // triger a compile time error is someone try to call packet
+ template<int LoadMode> typename MatrixType::PacketReturnType packet(Index) const;
+ template<int LoadMode> typename MatrixType::PacketReturnType packet(Index,Index) const;
};
/** \returns an expression of the main diagonal of the matrix \c *this