From bf792f59e3bbfc3b16e9807257a57120f5c5ff04 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 13 Nov 2015 12:24:22 -0800 Subject: [PATCH] Only enable the use of constexpr with nvcc if we're using version 7.5 or above --- Eigen/src/Core/util/Macros.h | 4 ++-- 1 file 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) || \