diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-01 17:45:58 +0100 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-01 17:45:58 +0100 |
commit | ab2b33e8029daade805812f7998190a2e14cf7e4 (patch) | |
tree | d6388c7e98ddd1e0e299e64d12094a8cb6442bfe /Eigen/src/LU | |
parent | e3e23805488d701b9f3a463ed226949c05d726c8 (diff) |
Add cast to aliasing check.
Otherwise, one of the geo tests fails to compile. Now there are some compiler
warnings about aliasing and type-punned pointers that I don't understand.
Diffstat (limited to 'Eigen/src/LU')
-rw-r--r-- | Eigen/src/LU/Inverse.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index 9e4e1dccf..e1276c6a3 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -296,7 +296,7 @@ struct ei_inverse_impl : public ReturnByValue<ei_inverse_impl<MatrixType> > template<typename Dest> inline void evalTo(Dest& dst) const { // FIXME this is a naive aliasing check that could be improved. It only catches x = x.inverse(); - ei_assert(&dst != &m_matrix && "Aliasing problem detected in inverse(), you need to do inverse().eval() here."); + ei_assert(&dst != (Dest*)(&m_matrix) && "Aliasing problem detected in inverse(), you need to do inverse().eval() here."); ei_compute_inverse<MatrixTypeNestedCleaned, Dest>::run(m_matrix, dst); } }; |