QLatin1StringMatcher: use specialization instead of an is_same chain
Same result, but less templates to instantiate, so should be faster to compile. Found in API-review. Change-Id: I43ebb94c73c6b4462441a7ae85a67909f6894ba3 Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 13d2d55957c52c4f2270248be57dc18bea507236) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e960afffc9
commit
1e86694501
@ -14,9 +14,9 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate {
|
||||
template <typename T>
|
||||
constexpr inline bool isLatin1OrUtf16View =
|
||||
std::disjunction_v<std::is_same<T, QLatin1StringView>, std::is_same<T, QStringView>>;
|
||||
template <typename T> constexpr inline bool isLatin1OrUtf16View = false;
|
||||
template <> constexpr inline bool isLatin1OrUtf16View<QLatin1StringView> = true;
|
||||
template <> constexpr inline bool isLatin1OrUtf16View<QStringView> = true;
|
||||
|
||||
template<class RandomIt1,
|
||||
class Hash = std::hash<typename std::iterator_traits<RandomIt1>::value_type>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user