From d259b719d1703e9271612d944e432edd72be1051 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 21 Jul 2015 17:35:58 -0700 Subject: [PATCH] Made sure that the use const expressions are not enabled when compiling with nvcc even when gcc 4.9 is used as the host compiler. --- Eigen/src/Core/util/Macros.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index f1f7c3082..d187257a6 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -410,7 +410,9 @@ #endif // Does the compiler support const expressions? -#if (defined(__cplusplus) && __cplusplus >= 201402L) || \ +#ifdef __CUDACC__ + // Const expressions are not supported regardless of what host compiler is used +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \ EIGEN_GNUC_AT_LEAST(4,9) #define EIGEN_HAS_CONSTEXPR 1 #endif