diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/main.h | 2 | ||||
-rw-r--r-- | test/packetmath.cpp | 2 | ||||
-rw-r--r-- | test/sparse_basic.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/test/main.h b/test/main.h index 4f9887c81..cf061730f 100644 --- a/test/main.h +++ b/test/main.h @@ -45,7 +45,7 @@ #include <queue> #include <cassert> #include <list> -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) #include <random> #include <chrono> #ifdef EIGEN_USE_THREADS diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 4ff193ee4..f5cce6436 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -761,7 +761,7 @@ void packetmath_real() { } } -#if EIGEN_HAS_C99_MATH && (__cplusplus > 199711L) +#if EIGEN_HAS_C99_MATH && (EIGEN_COMP_CXXVER >= 11) data1[0] = std::numeric_limits<Scalar>::infinity(); data1[1] = Scalar(-1); CHECK_CWISE1_IF(PacketTraits::HasLog1p, std::log1p, internal::plog1p); diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index 17897fd61..f7ad930e9 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp @@ -413,7 +413,7 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re m.setFromTriplets(triplets.begin(), triplets.end(), std::multiplies<Scalar>()); VERIFY_IS_APPROX(m, refMat_prod); -#if (defined(__cplusplus) && __cplusplus >= 201103L) +#if (EIGEN_COMP_CXXVER >= 11) m.setFromTriplets(triplets.begin(), triplets.end(), [] (Scalar,Scalar b) { return b; }); VERIFY_IS_APPROX(m, refMat_last); #endif |