mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
Use EIGEN_HAS_CXX11 and EIGEN_COMP_CXXVER macros to detect C++ version for std::result_of
and std::invoke_result
.
Fixes #2209
This commit is contained in:
parent
f6fc66aa75
commit
1e1c8a735c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user