From 1e866945014e86ef80ef5c73a7966ecd85242964 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 4 Sep 2024 15:54:41 +0200 Subject: [PATCH] QLatin1StringMatcher: use specialization instead of an is_same chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same result, but less templates to instantiate, so should be faster to compile. Found in API-review. Change-Id: I43ebb94c73c6b4462441a7ae85a67909f6894ba3 Reviewed-by: Øystein Heskestad Reviewed-by: Juha Vuolle (cherry picked from commit 13d2d55957c52c4f2270248be57dc18bea507236) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qlatin1stringmatcher.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/text/qlatin1stringmatcher.h b/src/corelib/text/qlatin1stringmatcher.h index dd3414fc6dc..b9576ae21c6 100644 --- a/src/corelib/text/qlatin1stringmatcher.h +++ b/src/corelib/text/qlatin1stringmatcher.h @@ -14,9 +14,9 @@ QT_BEGIN_NAMESPACE namespace QtPrivate { -template -constexpr inline bool isLatin1OrUtf16View = - std::disjunction_v, std::is_same>; +template constexpr inline bool isLatin1OrUtf16View = false; +template <> constexpr inline bool isLatin1OrUtf16View = true; +template <> constexpr inline bool isLatin1OrUtf16View = true; template::value_type>,