summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-18 14:52:04 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-12-20 07:38:29 +0100
commit99357e32a0e29c73ed721d6d31da66635e6586ca (patch)
tree4d3e20480ce6c2411875541690e507aef7622832 /src/corelib/global/qcompilerdetection.h
parent045fc1db757377771bba5c8f5c6429bbd02f441a (diff)
Fix detection of C++11 Unicode strings with icl.exe
Even though the compiler supports it, the MSVC headers might do something wrong and make compilation fail later due to attempting to overload unsigned short with char16_t. The _CHAR16_T definition comes from <cstddef>, so include that instead of <stddef.h> in C++ mode. Change-Id: Ifaeb1c92bde2db4ed4129507462391904afd6510 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 3a6f02db17..db5f6f3bb1 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -499,7 +499,7 @@
// at least since 13.1, but I can't test further back
# define Q_COMPILER_BINARY_LITERALS
# endif
-# if __cplusplus >= 201103L
+# if __cplusplus >= 201103L || defined(__INTEL_CXX11_MODE__)
# if __INTEL_COMPILER >= 1200
# define Q_COMPILER_AUTO_TYPE
# define Q_COMPILER_CLASS_ENUM
@@ -517,7 +517,9 @@
# define Q_COMPILER_AUTO_FUNCTION
# define Q_COMPILER_NULLPTR
# define Q_COMPILER_TEMPLATE_ALIAS
-# define Q_COMPILER_UNICODE_STRINGS
+# ifndef _CHAR16T // MSVC headers
+# define Q_COMPILER_UNICODE_STRINGS
+# endif
# define Q_COMPILER_VARIADIC_TEMPLATES
# endif
# if __INTEL_COMPILER >= 1300