From aaa7ab5222dee55cbd8c1bf180f8928888492a6b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 15 Sep 2020 11:01:36 +0200 Subject: Only include if using post C++17 Otherwise we hit an #error statement in MSVC standard library. Change-Id: Ib029edf0be8513a80f2640fd9ca75541615a0448 Reviewed-by: Giuseppe D'Angelo --- src/corelib/kernel/qmath.h | 2 +- src/corelib/text/qstringconverter.cpp | 2 +- src/corelib/tools/qalgorithms.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h index 4c5a980f3a..98251c0b57 100644 --- a/src/corelib/kernel/qmath.h +++ b/src/corelib/kernel/qmath.h @@ -47,7 +47,7 @@ #include #include -#if __has_include() +#if __has_include() && __cplusplus > 201703L #include #endif diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index 778674ebd8..4af4a1af9d 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -50,7 +50,7 @@ #include #endif -#if __has_include() +#if __has_include() && __cplusplus > 201703L #include #endif diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h index 58709f7fdf..11e4d9da39 100644 --- a/src/corelib/tools/qalgorithms.h +++ b/src/corelib/tools/qalgorithms.h @@ -42,7 +42,7 @@ #include -#if __has_include() +#if __has_include() && __cplusplus > 201703L #include #endif -- cgit v1.2.3