summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index b62ae30fc5..bb892cf751 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -844,21 +844,28 @@
#endif /* Q_CC_MSVC */
#ifdef __cplusplus
+# include <utility>
# if defined(Q_OS_QNX)
-# include <utility>
# if defined(_YVALS) || defined(_LIBCPP_VER)
// QNX: libcpp (Dinkumware-based) doesn't have the <initializer_list>
// header, so the feature is useless, even if the compiler supports
// it. Disable.
-# ifdef Q_COMPILER_INITIALIZER_LISTS
-# undef Q_COMPILER_INITIALIZER_LISTS
-# endif
-# ifdef Q_COMPILER_RVALUE_REFS
-# undef Q_COMPILER_RVALUE_REFS
-# endif
+# undef Q_COMPILER_INITIALIZER_LISTS
+// That libcpp doesn't have std::move either, so disable everything
+// related to rvalue refs.
+# undef Q_COMPILER_RVALUE_REFS
+# undef Q_COMPILER_REF_QUALIFIERS
# endif
+# endif // Q_OS_QNX
+# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
+ && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
+// Mac OS X: Apple has not updated libstdc++ since 2007, which means it does not have
+// <initializer_list> or std::move. Let's disable these features
+# undef Q_COMPILER_INITIALIZER_LISTS
+# undef Q_COMPILER_RVALUE_REFS
+# undef Q_COMPILER_REF_QUALIFIERS
# endif
-#endif // Q_OS_QNX
+#endif
/*
* C++11 keywords and expressions