summaryrefslogtreecommitdiff
path: root/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
blob: 4c2a37cb6c35e281846724647db88efb58d934b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
https://bugreports.qt.io/browse/QTBUG-123937
From 6810220218cbbf2854ecdedb291f7e4a84b31e54 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 3 Apr 2024 00:47:01 +0200
Subject: [PATCH] Use ifdef instead of if for __cpp_lib_span

Like the other times it's used in this file

This is causing compilation errors in projects that use -Werror=undef

Fixes: QTBUG-123937
Change-Id: I0cdd2910755dc9079890011dd8dbc27a6e64793e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 699ddcb15b5e981d32ea65d1c1a12f8fa0b06e0d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
--- a/src/corelib/tools/qspan.h
+++ b/src/corelib/tools/qspan.h
@@ -297,7 +297,7 @@ public:
         : QSpanBase(il.begin(), il.size())
     {}
 
-#if __cpp_lib_span
+#ifdef __cpp_lib_span
     template <typename S, size_t N, if_qualification_conversion<S> = true>
     Q_IMPLICIT constexpr QSpanBase(std::span<S, N> other) noexcept
         : QSpanBase(other.data(), other.size())
-- 
2.44.0