summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-09-30 14:11:14 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-10-01 02:46:09 +0200
commit44a74127954dce2416842a6644cbdff4c513b6fb (patch)
treeb97491cf7d9e566e6ff24e622feb5c86933ca594 /src/corelib/kernel/qvariant.h
parent79f62380f09988949bc601060ff5131cf34de872 (diff)
Remove checks for C++ standard versions C++17 and below
Qt requires a compiler that support C++17 thus __cplusplus is always 201703L or higher. This patch removes checks for __cplusplus value that always succeed. Change-Id: I4b830683ecefab8f913d8b09604086d53209d2e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r--src/corelib/kernel/qvariant.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index d8ef892cb7..213368a036 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -58,7 +58,7 @@
#include <memory>
#include <type_traits>
-#if __has_include(<variant>) && __cplusplus >= 201703L
+#if __has_include(<variant>)
#include <variant>
#elif defined(Q_CLANG_QDOC)
namespace std { template<typename...> struct variant; }
@@ -402,7 +402,7 @@ class Q_CORE_EXPORT QVariant
return QVariant(QMetaType::fromType<T>(), std::addressof(value));
}
-#if (__has_include(<variant>) && __cplusplus >= 201703L) || defined(Q_CLANG_QDOC)
+#if __has_include(<variant>) || defined(Q_CLANG_QDOC)
template<typename... Types>
static inline QVariant fromStdVariant(const std::variant<Types...> &value)
{
@@ -580,7 +580,7 @@ inline QVariant QVariant::fromValue(const QVariant &value)
return value;
}
-#if __has_include(<variant>) && __cplusplus >= 201703L
+#if __has_include(<variant>)
template<>
inline QVariant QVariant::fromValue(const std::monostate &)
{