mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
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.
This commit is contained in:
parent
e3e2380548
commit
ab2b33e802
@ -296,7 +296,7 @@ struct ei_inverse_impl : public ReturnByValue<ei_inverse_impl<MatrixType> >
|
|||||||
template<typename Dest> inline void evalTo(Dest& dst) const
|
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();
|
// 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);
|
ei_compute_inverse<MatrixTypeNestedCleaned, Dest>::run(m_matrix, dst);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user