diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2021-04-11 16:51:48 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2021-04-12 01:26:15 +0000 |
commit | 1e1c8a735c96b2f630a6cefae09d57dd4b1dd4ed (patch) | |
tree | 464d1fb7721db3f50fdbfd14aa31acb3670fc936 /Eigen | |
parent | f6fc66aa75722db0b8a4a397bfc64bd231e7473f (diff) |
Use EIGEN_HAS_CXX11 and EIGEN_COMP_CXXVER macros to detect C++ version for `std::result_of` and `std::invoke_result`.
Fixes #2209
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index bdc0de0ea..72ffd2495 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -684,8 +684,7 @@ // Does the compiler support result_of? // result_of was deprecated in c++17 and removed in c++ 20 #ifndef EIGEN_HAS_STD_RESULT_OF -#if EIGEN_MAX_CPP_VER >= 11 && \ - (defined(__cplusplus) && __cplusplus >= 201103L && __cplusplus < 201703L) +#if EIGEN_HAS_CXX11 && EIGEN_COMP_CXXVER < 17 #define EIGEN_HAS_STD_RESULT_OF 1 #else #define EIGEN_HAS_STD_RESULT_OF 0 @@ -704,8 +703,7 @@ #endif // EIGEN_HAS_STD_HASH #ifndef EIGEN_HAS_STD_INVOKE_RESULT -#if EIGEN_MAX_CPP_VER >= 17 && \ - (defined(__cplusplus) && __cplusplus >= 201703L) +#if EIGEN_MAX_CPP_VER >= 17 && EIGEN_COMP_CXXVER >= 17 #define EIGEN_HAS_STD_INVOKE_RESULT 1 #else #define EIGEN_HAS_STD_INVOKE_RESULT 0 |