summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-08 17:20:06 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-01-19 23:41:52 +0000
commit7ffcafd1b5baab0cbb6022ae7b9d4ca1bd76c353 (patch)
treeb0e097ee4147a27d0339bb2d8923ba6a2a9250ae /src/corelib/thread
parent57671bebbcfc06d0ad390dd470f51eb1f8556314 (diff)
Remove all the atomic code besides MSVC and std::atomic
[ChangeLog][Important Behavior Changes] Starting with Qt 5.7, Qt requires a C++11 compiler with support for C++11 atomics. This affects user code too: Qt headers no longer compile with a C++98 compiler. The minimum compiler versions for this release are: * Clang 3.4 (found in XCode 5.1) * GCC 4.7 * Microsoft Visual Studio 2012 Change-Id: Ib056b47dde3341ef9a52ffff13ef1f496ea9363f Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qbasicatomic.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index c6d70e578d..bf94386fb2 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -46,42 +46,16 @@
# include <QtCore/qatomic_bootstrap.h>
// If C++11 atomics are supported, use them!
-#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) && !defined(QT_ATOMIC_FORCE_NO_CXX11)
+#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR)
# 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>
-
-// Compiler dependent implementation
+// We only support one fallback: MSVC, because even on version 2015, it lacks full constexpr support
#elif defined(Q_CC_MSVC)
# include <QtCore/qatomic_msvc.h>
-// Processor dependent implementation
-#elif defined(Q_PROCESSOR_ARM_V7) && defined(Q_PROCESSOR_ARM_32)
-# include "QtCore/qatomic_armv7.h"
-#elif defined(Q_PROCESSOR_ARM_V6) && defined(Q_PROCESSOR_ARM_32)
-# include "QtCore/qatomic_armv6.h"
-#elif defined(Q_PROCESSOR_ARM_V5) && defined(Q_PROCESSOR_ARM_32)
-# include "QtCore/qatomic_armv5.h"
-#elif defined(Q_PROCESSOR_IA64)
-# include "QtCore/qatomic_ia64.h"
-#elif defined(Q_PROCESSOR_X86)
-# include <QtCore/qatomic_x86.h>
-
-// Fallback compiler dependent implementation
-#elif defined(Q_CC_GNU)
-# include <QtCore/qatomic_gcc.h>
-
-// Fallback operating system dependent implementation
-#elif defined(Q_OS_UNIX)
-# include <QtCore/qatomic_unix.h>
-
// No fallback
#else
-# error "Qt has not been ported to this platform"
+# error "Qt requires C++11 support"
#endif
QT_BEGIN_NAMESPACE