aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-11-13 12:24:22 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-11-13 12:24:22 -0800
commitbf792f59e3bbfc3b16e9807257a57120f5c5ff04 (patch)
tree75b761c1d608c9abe51a41739af78897fc4ff975 /Eigen
parentf1fbd74db9d7c349e6612250d5dd1863c24e8495 (diff)
Only enable the use of constexpr with nvcc if we're using version 7.5 or above
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/util/Macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index f4034ebdb..bc81c1e82 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -353,8 +353,8 @@
// Does the compiler support const expressions?
#ifdef __CUDACC__
-// Const expressions are supported provided that c++11 is enabled
-#if __cplusplus > 199711L
+// Const expressions are supported provided that c++11 is enabled and we're using nvcc 7.5 or above
+#if defined(__CUDACC_VER__) && __CUDACC_VER__ >= 70500 && __cplusplus > 199711L
#define EIGEN_HAS_CONSTEXPR 1
#endif
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \