diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-08 14:35:03 -0700 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-10-16 18:52:00 +0000 |
commit | 9d1fab424e38d0ed40677926c0a434272ad41320 (patch) | |
tree | 12fb43944c54cc99a459652f666482a70017173e /src/corelib/thread/qbasicatomic.h | |
parent | c751cef8d6fe3e6bee1ec9a0466094b3255ca037 (diff) |
Make the C++11 atomic support the default, if available
Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib/thread/qbasicatomic.h')
-rw-r--r-- | src/corelib/thread/qbasicatomic.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 <QtCore/qatomic_bootstrap.h> -// 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 <QtCore/qatomic_cxx11.h> + +// 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 <QtCore/qatomic_gcc.h> @@ -66,8 +68,6 @@ # include <QtCore/qatomic_x86.h> // Fallback compiler dependent implementation -#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) -# include <QtCore/qatomic_cxx11.h> #elif defined(Q_CC_GNU) # include <QtCore/qatomic_gcc.h> |