Skip to content

Commit a950c3a

Browse files
committed
fix(test/string): avoid use of deleted function
This should fix a build issue for gcc16+, where the build fails due to test `error: use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const wchar_t*) [with _Traits = char_traits<char>]’ 148 | DLIB_TEST_MSG( (left_substr(ws,L".") == L"file"), L"");`
1 parent 2a70e7b commit a950c3a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dlib/test/string.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ namespace
145145

146146
wstring ws = L"file.txt";
147147
DLIB_TEST( (left_substr(ws,wstring(L".")) == L"file"));
148-
DLIB_TEST_MSG( (left_substr(ws,L".") == L"file"), L"");
148+
DLIB_TEST_MSG( (left_substr(narrow(ws),L".") == L"file"), L"");
149149
DLIB_TEST( (right_substr(ws,wstring(L".")) == L"txt"));
150-
DLIB_TEST_MSG( (right_substr(ws,L".") == L"txt"), L"");
150+
DLIB_TEST_MSG( (right_substr(narrow(ws),L".") == L"txt"), L"");
151151

152152

153153
dlog << LTRACE << 8;

0 commit comments

Comments
 (0)