aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/ThreadPool
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-08-23 12:59:46 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-08-23 12:59:46 -0700
commite9f9d70611d0a66751c34b1430ed7649aff6e2bf (patch)
tree430df1731cde227e786a2c8169ecedc391c77e7e /unsupported/Eigen/CXX11/src/ThreadPool
parent668690978ff66151b2a495767c7daf33d06be4a5 (diff)
Don't rely on __had_feature for g++.
Don't use __thread. Only use thread_local for gcc 4.8 or newer.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool')
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h
index f33759ba9..89ed6e5e5 100644
--- a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h
+++ b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h
@@ -12,10 +12,10 @@
#undef EIGEN_THREAD_LOCAL
-#if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_thread_local))
- #define EIGEN_THREAD_LOCAL static thread_local
-#elif (EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)) || EIGEN_COMP_CLANG
- #define EIGEN_THREAD_LOCAL static __thread
+#if EIGEN_MAX_CPP_VER >= 11 && \
+ ((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \
+ __has_feature(cxx_thread_local))
+#define EIGEN_THREAD_LOCAL static thread_local
#endif
// Disable TLS for Apple and Android builds with older toolchains.