mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
Detect cxx_constexpr support when compiling with clang.
This commit is contained in:
parent
318e65e0ae
commit
1a325ef71c
@ -371,10 +371,10 @@
|
|||||||
// Does the compiler support const expressions?
|
// Does the compiler support const expressions?
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
// Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
|
// Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
|
||||||
#if __cplusplus > 199711L && defined(__CUDACC_VER__) && (defined(__clang__) || __CUDACC_VER__ >= 70500)
|
#if __cplusplus > 199711L && defined(__CUDACC_VER__) && (EIGEN_COMP_CLANG || __CUDACC_VER__ >= 70500)
|
||||||
#define EIGEN_HAS_CONSTEXPR 1
|
#define EIGEN_HAS_CONSTEXPR 1
|
||||||
#endif
|
#endif
|
||||||
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
#elif __has_feature(cxx_constexpr) || (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
||||||
EIGEN_GNUC_AT_LEAST(4,8)
|
EIGEN_GNUC_AT_LEAST(4,8)
|
||||||
#define EIGEN_HAS_CONSTEXPR 1
|
#define EIGEN_HAS_CONSTEXPR 1
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user