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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 86d027eb35..a08fde8bb0 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -105,6 +105,12 @@
# endif
# define Q_DECL_EXPORT __declspec(dllexport)
# define Q_DECL_IMPORT __declspec(dllimport)
+# if _MSC_VER >= 1800
+# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) stdext::make_unchecked_array_iterator(x)
+# endif
+# if _MSC_VER >= 1500
+# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N))
+# endif
/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
# if defined(__INTEL_COMPILER)
# define Q_DECL_VARIABLE_DEPRECATED
@@ -1106,6 +1112,11 @@
# define Q_ALIGNOF(x) alignof(x)
#endif
+#if defined(Q_COMPILER_ALIGNAS)
+# undef Q_DECL_ALIGN
+# define Q_DECL_ALIGN(n) alignas(n)
+#endif
+
/*
* Fallback macros to certain compiler features
*/
@@ -1174,6 +1185,12 @@
#ifndef Q_DECL_CONST_FUNCTION
# define Q_DECL_CONST_FUNCTION Q_DECL_PURE_FUNCTION
#endif
+#ifndef QT_MAKE_UNCHECKED_ARRAY_ITERATOR
+# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) (x)
+#endif
+#ifndef QT_MAKE_CHECKED_ARRAY_ITERATOR
+# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) (x)
+#endif
/*
* SG10's SD-6 feature detection and some useful extensions from Clang and GCC