From fbfec48c423d270152e5b4f471c10064482846b5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 23 Aug 2024 09:39:21 -0700 Subject: [PATCH] tst_QByteArrayView: remove use of std::char_traits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 dc2ae08e02730ab795445bc047221aa56914f723. which is: QStringView: stop instantiating std::char_traits and It's deprecated and will be removed with LLVM 19. Amends b1ee49b46533d39f7fabda68d0bd08a1ab130a27. Fixes: QTBUG-128325 Task-number: QTBUG-126214 Task-number: QTBUG-122753 Pick-to: 6.7 Change-Id: I2c7fbe3c0f557e98e7edfffdb00b4cc71a6612ca Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Cristian Adam (cherry picked from commit b387537d3e9c35d9f112d4aa32ad71df5e5e9028) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp b/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp index 702e1840da6..5802f2a583a 100644 --- a/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp +++ b/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp @@ -519,7 +519,7 @@ namespace help { template size_t size(const T &t) { return size_t(t.size()); } template -size_t size(const T *t) { return std::char_traits::length(t); } +size_t size(const T *t) { return QtPrivate::lengthHelperPointer(t); } template decltype(auto) cbegin(const T &t) { return t.begin(); }