Introduce internal's UIntPtr and IntPtr types for pointer to integer conversions.

This fixes "conversion from pointer to same-sized integral type" warnings by ICC.
Ideally, we would use the std::[u]intptr_t types all the time, but since they are C99/C++11 only,
let's be safe.
This commit is contained in:
Gael Guennebaud
2016-05-26 10:52:12 +02:00
parent 40e4637d79
commit 27f0434233
9 changed files with 23 additions and 15 deletions

View File

@@ -166,7 +166,7 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
void checkSanity(typename internal::enable_if<(internal::traits<T>::Alignment>0),void*>::type = 0) const
{
#if EIGEN_MAX_ALIGN_BYTES>0
eigen_assert(( ((size_t(m_data) % internal::traits<Derived>::Alignment) == 0)
eigen_assert(( ((internal::UIntPtr(m_data) % internal::traits<Derived>::Alignment) == 0)
|| (cols() * rows() * innerStride() * sizeof(Scalar)) < internal::traits<Derived>::Alignment ) && "data is not aligned");
#endif
}