diff options
author | 2016-05-20 15:10:08 +0200 | |
---|---|---|
committer | 2016-05-20 15:10:08 +0200 | |
commit | ccaace03c90b9d9952889a2b8f133a6e7ab86223 (patch) | |
tree | dfe0afc3362d0a63cca45790e6d48fa017d07e73 /Eigen/src/Core | |
parent | c3410804cdaa8d4ce16d8269e86228eb8a2caf3b (diff) |
Make EIGEN_HAS_CONSTEXPR user configurable
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 981873e70..466ca73ac 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -393,6 +393,8 @@ #endif // Does the compiler fully support const expressions? (as in c++14) +#ifndef EIGEN_HAS_CONSTEXPR + #ifdef __CUDACC__ // Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above #if EIGEN_MAX_CPP_VER>=14 && (__cplusplus > 199711L && defined(__CUDACC_VER__) && (EIGEN_COMP_CLANG || __CUDACC_VER__ >= 70500)) @@ -403,6 +405,12 @@ #define EIGEN_HAS_CONSTEXPR 1 #endif +#ifndef EIGEN_HAS_CONSTEXPR +#define EIGEN_HAS_CONSTEXPR 0 +#endif + +#endif + // Does the compiler support C++11 math? // Let's be conservative and enable the default C++11 implementation only if we are sure it exists #ifndef EIGEN_HAS_CXX11_MATH |