summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d546f19cb8..2fadc6d83b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -86,6 +86,16 @@
#include <QtCore/qprocessordetection.h>
#include <QtCore/qcompilerdetection.h>
+// This could go to the very beginning of this file, but we're using compiler
+// detection, so it's here.
+#if defined(__cplusplus) && (__cplusplus < 201703L)
+# ifdef Q_CC_MSVC
+# error "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler."
+# else
+# error "Qt requires a C++17 compiler"
+# endif
+#endif // __cplusplus
+
#if defined (__ELF__)
# define Q_OF_ELF
#endif