mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-04 01:34:07 +08:00
Only enable the use of const expression when nvcc is called with the -std=c++11 option
This commit is contained in:
parent
150c12e138
commit
e4d45f3440
@ -353,8 +353,10 @@
|
|||||||
|
|
||||||
// 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
|
||||||
|
#if __cplusplus > 199711L
|
||||||
#define EIGEN_HAS_CONSTEXPR 1
|
#define EIGEN_HAS_CONSTEXPR 1
|
||||||
// Const expressions are not supported regardless of what host compiler is used
|
#endif
|
||||||
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
||||||
EIGEN_GNUC_AT_LEAST(4,8)
|
EIGEN_GNUC_AT_LEAST(4,8)
|
||||||
#define EIGEN_HAS_CONSTEXPR 1
|
#define EIGEN_HAS_CONSTEXPR 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user