tst_QByteArrayView: remove use of std::char_traits
Complements ab05e05f60253b9be615c09aa340ee75f2e5bcaf:
Strings: get rid of the last std::char_traits use
LLVM's libc++ became pedantic and insists on only accepting
instantiations for one of the standard Char types, so remove all uses of
it with a template parameter.
Complements dc2ae08e02.
which is:
QStringView: stop instantiating std::char_traits<QChar> and <uchar>
It's deprecated and will be removed with LLVM 19.
Amends b1ee49b465.
Fixes: QTBUG-128325
Task-number: QTBUG-126214
Task-number: QTBUG-122753
Pick-to: 6.7
Change-Id: I2c7fbe3c0f557e98e7edfffdb00b4cc71a6612ca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit b387537d3e9c35d9f112d4aa32ad71df5e5e9028)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
parent
0b328b6b00
commit
fbfec48c42
|
|
@ -519,7 +519,7 @@ namespace help {
|
|||
template <typename T>
|
||||
size_t size(const T &t) { return size_t(t.size()); }
|
||||
template <typename T>
|
||||
size_t size(const T *t) { return std::char_traits<T>::length(t); }
|
||||
size_t size(const T *t) { return QtPrivate::lengthHelperPointer(t); }
|
||||
|
||||
template <typename T>
|
||||
decltype(auto) cbegin(const T &t) { return t.begin(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue