Only enable the use of constexpr with nvcc if we're using version 7.5 or above

This commit is contained in:
Benoit Steiner 2015-11-13 12:24:22 -08:00
parent f1fbd74db9
commit bf792f59e3

View File

@ -353,8 +353,8 @@
// 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 // Const expressions are supported provided that c++11 is enabled and we're using nvcc 7.5 or above
#if __cplusplus > 199711L #if defined(__CUDACC_VER__) && __CUDACC_VER__ >= 70500 && __cplusplus > 199711L
#define EIGEN_HAS_CONSTEXPR 1 #define EIGEN_HAS_CONSTEXPR 1
#endif #endif
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \ #elif (defined(__cplusplus) && __cplusplus >= 201402L) || \