diff options
-rwxr-xr-x | Eigen/src/Core/util/Meta.h | 4 | ||||
-rw-r--r-- | test/blasutil.cpp | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index c892e499c..68452ecfa 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -160,6 +160,10 @@ template<> struct make_unsigned<unsigned long> { typedef unsigned long type; template<> struct make_unsigned<signed __int64> { typedef unsigned __int64 type; }; template<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; }; #endif + +// TODO: Some platforms define int64_t as long long even for C++03. In this case +// we are missing the definition for make_unsigned. If we just define it, we get +// duplicated definitions for platforms defining int64_t as signed long for C++03 #endif template <typename T> struct add_const { typedef const T type; }; diff --git a/test/blasutil.cpp b/test/blasutil.cpp index cd8716351..255d2a6ca 100644 --- a/test/blasutil.cpp +++ b/test/blasutil.cpp @@ -186,11 +186,17 @@ EIGEN_DECLARE_TEST(blasutil) { for(int i = 0; i < g_repeat; i++) { - CALL_SUBTEST_1(run_test<int8_t>()); - CALL_SUBTEST_2(run_test<int16_t>()); - CALL_SUBTEST_3(run_test<int32_t>()); - CALL_SUBTEST_4(run_test<int64_t>()); - CALL_SUBTEST_5(run_test<float_t>()); - CALL_SUBTEST_6(run_test<double_t>()); + CALL_SUBTEST_1(run_test<numext::int8_t>()); + CALL_SUBTEST_2(run_test<numext::int16_t>()); + CALL_SUBTEST_3(run_test<numext::int32_t>()); +// TODO: Replace this by a call to numext::int64_t as soon as we have a way to +// detect the typedef for int64_t on all platforms +#if EIGEN_HAS_CXX11 + CALL_SUBTEST_4(run_test<signed long long>()); +#else + CALL_SUBTEST_4(run_test<signed long>()); +#endif + CALL_SUBTEST_5(run_test<numext::float_t>()); + CALL_SUBTEST_6(run_test<numext::double_t>()); } }
\ No newline at end of file |