diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-09-13 09:44:46 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-09-13 09:44:46 +0200 |
commit | 5927eef6127aae89abcc7f98e3a7ba66f6bdf56e (patch) | |
tree | 664212ad467fde048fe21063ab8e0d9a9f69bd84 /Eigen | |
parent | 3adece4827c1a11a6e2c4ba95e6fddc682a145d2 (diff) |
Enable std::result_of for msvc 2015 and later
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index bcdede61e..3af6c4e37 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -533,8 +533,11 @@ #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. #ifndef EIGEN_HAS_STD_RESULT_OF -#if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L))) +#if EIGEN_MAX_CPP_VER>=11 && \ + (__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L) || EIGEN_COMP_MSVC >= 1900) #define EIGEN_HAS_STD_RESULT_OF 1 #else #define EIGEN_HAS_STD_RESULT_OF 0 |