From ad56f130cf30e8940c8012d5c4b2ebce4b5af711 Mon Sep 17 00:00:00 2001 From: Alex Shek Date: Tue, 24 Feb 2026 12:04:59 +0800 Subject: [PATCH 1/2] fix(test/string): avoid use of deleted function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove portion of code to fix a build issue for gcc16(C++23), where the build fails due to test `error: use of deleted function ‘std::basic_ostream& std::operator<<(basic_ostream&, const wchar_t*) [with _Traits = char_traits]’ 148 | DLIB_TEST_MSG( (left_substr(ws,L".") == L"file"), L"");` --- dlib/test/string.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dlib/test/string.cpp b/dlib/test/string.cpp index 18f9035c5f..2c5948fd6d 100644 --- a/dlib/test/string.cpp +++ b/dlib/test/string.cpp @@ -143,13 +143,6 @@ namespace DLIB_TEST( (left_substr(a,"") == "file.txt")); DLIB_TEST( (right_substr(a,"") == "")); - wstring ws = L"file.txt"; - DLIB_TEST( (left_substr(ws,wstring(L".")) == L"file")); - DLIB_TEST_MSG( (left_substr(ws,L".") == L"file"), L""); - DLIB_TEST( (right_substr(ws,wstring(L".")) == L"txt")); - DLIB_TEST_MSG( (right_substr(ws,L".") == L"txt"), L""); - - dlog << LTRACE << 8; { ostringstream sout; From 8503394561f8689e274892ca795e2e14202b0d05 Mon Sep 17 00:00:00 2001 From: Alex Shek Date: Tue, 24 Feb 2026 14:38:14 +0800 Subject: [PATCH 2/2] fix(test/tokenizer): remove u8"..." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++20 fails due to convert from ‘’ to ‘std::vector >’ --- dlib/test/tokenizer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlib/test/tokenizer.cpp b/dlib/test/tokenizer.cpp index f4300666a2..24d24906ea 100644 --- a/dlib/test/tokenizer.cpp +++ b/dlib/test/tokenizer.cpp @@ -394,10 +394,10 @@ namespace deserialize(loaded_test, in_stream); std::vector test_strings = { - u8"This is a test of the tokenisation process...\nimplemented in the Dlib library!", // English - u8"Ceci est un test du processus de\ntokenisation implémenté dans\nla bibliothèque Dlib!", // French - u8"Dette er en test af tokeniseringsprocessen implementeret i Dlib-biblioteket!", // Danish - u8"这是对Dlib库中实现的标记化过程的测试!" // Chinese + "This is a test of the tokenisation process...\nimplemented in the Dlib library!", // English + "Ceci est un test du processus de\ntokenisation implémenté dans\nla bibliothèque Dlib!", // French + "Dette er en test af tokeniseringsprocessen implementeret i Dlib-biblioteket!", // Danish + "这是对Dlib库中实现的标记化过程的测试!" // Chinese }; for (const auto& text : test_strings) {