From ced68767daaa8a7e4ccf04ec445027b5f43dfa25 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 31 Oct 2024 11:37:02 +0100 Subject: [PATCH] QByteArrayView: port IsCompatibleByteTypeHelper from is_same-chain to specialization Less templates to instantiate, so faster compilation. Pick-to: 6.5 6.2 Change-Id: I0552e496895db2710f33b8fd4b555cfa5c2d8157 Reviewed-by: Thiago Macieira (cherry picked from commit 327e8a904cb8e6665b7e42ae35cdcfd2afc84409) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qbytearrayview.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/corelib/text/qbytearrayview.h b/src/corelib/text/qbytearrayview.h index 09dd70aa6f2..4934777fb21 100644 --- a/src/corelib/text/qbytearrayview.h +++ b/src/corelib/text/qbytearrayview.h @@ -18,12 +18,11 @@ QT_BEGIN_NAMESPACE namespace QtPrivate { template -struct IsCompatibleByteTypeHelper - : std::integral_constant || - std::is_same_v || - std::is_same_v || - std::is_same_v> {}; +struct IsCompatibleByteTypeHelper : std::false_type {}; +template <> struct IsCompatibleByteTypeHelper : std::true_type {}; +template <> struct IsCompatibleByteTypeHelper : std::true_type {}; +template <> struct IsCompatibleByteTypeHelper : std::true_type {}; +template <> struct IsCompatibleByteTypeHelper : std::true_type {}; template struct IsCompatibleByteType