mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 17:33:15 +08:00
#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.
This commit is contained in:
parent
52d1dd979a
commit
cb654b1c45
@ -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 && \
|
||||
|
Loading…
x
Reference in New Issue
Block a user