From ab2b33e8029daade805812f7998190a2e14cf7e4 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Tue, 1 Jun 2010 17:45:58 +0100 Subject: [PATCH] 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. --- Eigen/src/LU/Inverse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 > template 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::run(m_matrix, dst); } };