From 6cafe0f2b48c5f07f07de52490b1d07c7325557b Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 9 Jul 2024 15:24:31 +0200 Subject: [PATCH] Remove QBAV(QL1SV) and QBAV(QU8SV) constructors They were added because of conditional noexcept on the relational operators that was preventing the other constructors from being picked up by the compiler. Now when we removed the conditional noexcept on the relational operators, we no longer need this constructors. This patch reverts bd581e35e7485cf42fbefd250be7b146737d9d41 and partially reverts fff6562f8c074d75bda8b80f844dc63c6f2e64d5. Pick-to: 6.8 Change-Id: I22cb4507bff0a929a25d2f15caed66cc30d20dc9 Reviewed-by: Thiago Macieira --- src/corelib/text/qbytearrayview.h | 4 ---- src/corelib/text/qlatin1stringview.h | 4 ---- src/corelib/text/qutf8stringview.h | 5 ----- 3 files changed, 13 deletions(-) diff --git a/src/corelib/text/qbytearrayview.h b/src/corelib/text/qbytearrayview.h index dea0e6cbe8d..5a4b7028123 100644 --- a/src/corelib/text/qbytearrayview.h +++ b/src/corelib/text/qbytearrayview.h @@ -176,10 +176,6 @@ public: constexpr QByteArrayView(const char (&data)[Size]) noexcept : QByteArrayView(data, lengthHelperCharArray(data, Size)) {} - constexpr QByteArrayView(QLatin1StringView v) noexcept; // defined in qlatin1stringview.h - template - constexpr QByteArrayView(QBasicUtf8StringView v) noexcept; // defined in qutf8stringview.h - #ifdef Q_QDOC template #else diff --git a/src/corelib/text/qlatin1stringview.h b/src/corelib/text/qlatin1stringview.h index 91392d9540c..7232be7c9ba 100644 --- a/src/corelib/text/qlatin1stringview.h +++ b/src/corelib/text/qlatin1stringview.h @@ -349,10 +349,6 @@ Q_DECLARE_TYPEINFO(QLatin1StringView, Q_RELOCATABLE_TYPE); Q_DECLARE_TYPEINFO(QLatin1String, Q_RELOCATABLE_TYPE); #endif -constexpr QByteArrayView::QByteArrayView(QLatin1StringView v) noexcept - : QByteArrayView(v.data(), v.size()) -{} - namespace Qt { inline namespace Literals { inline namespace StringLiterals { diff --git a/src/corelib/text/qutf8stringview.h b/src/corelib/text/qutf8stringview.h index 7ae06c0ec40..87a974414ca 100644 --- a/src/corelib/text/qutf8stringview.h +++ b/src/corelib/text/qutf8stringview.h @@ -411,11 +411,6 @@ private: qsizetype m_size; }; -template -constexpr QByteArrayView::QByteArrayView(QBasicUtf8StringView v) noexcept - : QByteArrayView(v.data(), v.size()) -{} - #ifdef Q_QDOC #undef QBasicUtf8StringView #else