diff options
author | shrek1402 <shrek.2000@yandex.ru> | 2021-01-07 10:12:25 +0000 |
---|---|---|
committer | David Tellenbach <david.tellenbach@me.com> | 2021-01-07 10:12:25 +0000 |
commit | cb654b1c45ace502727115c3fb7eaddc9fa13abb (patch) | |
tree | 3f40dc2e8187e34c18947ae00a3b4cb66cacc218 /Eigen/src/Core/util/Macros.h | |
parent | 52d1dd979af688fbf67c34860527b3a4295b7936 (diff) |
#define was defined incorrectly because the result_of function was deprecated in c++17 and removed in c++20. Also, EIGEN_COMP_MSVC (which is _MSC_VER) only affects result_of indirectly, which can cause errors.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index c021cc32d..6ef90d54f 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -657,16 +657,15 @@ #endif // Does the compiler support result_of? -// It's likely that MSVC 2013 supports result_of but I couldn't not find a good source for that, -// so let's be conservative. +// result_of was deprecated in c++17 and removed in c++ 20 #ifndef EIGEN_HAS_STD_RESULT_OF -#if EIGEN_MAX_CPP_VER>=11 && \ - (__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L) || EIGEN_COMP_MSVC >= 1900) +#if EIGEN_MAX_CPP_VER >= 11 && \ + ((defined(__cplusplus) && __cplusplus >= 201103L && __cplusplus < 201703L) || \ + __has_feature(cxx_lambdas)) #define EIGEN_HAS_STD_RESULT_OF 1 #else #define EIGEN_HAS_STD_RESULT_OF 0 #endif -#endif #ifndef EIGEN_HAS_ALIGNAS #if EIGEN_MAX_CPP_VER>=11 && EIGEN_HAS_CXX11 && \ |