aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-05-26 10:52:12 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-05-26 10:52:12 +0200
commit27f043423375f473c0a76347f1b8d0066c51c89b (patch)
tree064ad5a941a76195999452e5f2a4cfeed536e7cc /Eigen/src/Core/util/Meta.h
parent40e4637d795343ad36014201845a59dfa70582a8 (diff)
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.
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rw-r--r--Eigen/src/Core/util/Meta.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index 1bb6a6ed6..604f509b9 100644
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -27,6 +27,14 @@ namespace internal {
* we however don't want to add a dependency to Boost.
*/
+#if EIGEN_COMP_ICC
+typedef std::intptr_t IntPtr;
+typedef std::uintptr_t UIntPtr;
+#else
+typedef std::ptrdiff_t IntPtr;
+typedef std::size_t UIntPtr;
+#endif
+
struct true_type { enum { value = 1 }; };
struct false_type { enum { value = 0 }; };