From 9d1fab424e38d0ed40677926c0a434272ad41320 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Jul 2015 14:35:03 -0700 Subject: Make the C++11 atomic support the default, if available Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1 Reviewed-by: Lars Knoll --- src/corelib/thread/qbasicatomic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index ecf39d699f..a747134df3 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -39,11 +39,13 @@ #if defined(QT_BOOTSTRAPPED) # include -// The following two are used for testing only. -// Note that we don't check the compiler support -- you had better -// know what you're doing if you set them -#elif defined(QT_ATOMIC_FORCE_CXX11) +// If C++11 atomics are supported, use them! +#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) && !defined(QT_ATOMIC_FORCE_NO_CXX11) # include + +// The following is used for testing only. +// Note that we don't check the compiler support -- you had better +// know what you're doing if you set it #elif defined(QT_ATOMIC_FORCE_GCC) # include @@ -66,8 +68,6 @@ # include // Fallback compiler dependent implementation -#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) -# include #elif defined(Q_CC_GNU) # include -- cgit v1.2.3