From 72e32013fcbae69a49c183259ee677ef281d8720 Mon Sep 17 00:00:00 2001 From: halx99 Date: Wed, 5 Oct 2022 10:55:57 +0800 Subject: [PATCH] c++ 20 compiler support --- tests/test_memory.cpp | 2 +- tests/test_unicode.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_memory.cpp b/tests/test_memory.cpp index 3258736..790ce97 100644 --- a/tests/test_memory.cpp +++ b/tests/test_memory.cpp @@ -110,7 +110,7 @@ TEST(memory_large_allocations) // grow for (node = doc.first_child(); node; node = node.next_sibling()) { - std::basic_string s = node.value(); + std::basic_string s{ node.value() }; CHECK(node.set_value((s + s).c_str())); } diff --git a/tests/test_unicode.cpp b/tests/test_unicode.cpp index 4cb6114..82bf282 100644 --- a/tests/test_unicode.cpp +++ b/tests/test_unicode.cpp @@ -146,7 +146,7 @@ TEST(as_utf8_invalid) TEST(as_utf8_string) { - std::basic_string s = L"abcd"; + std::wstring s = L"abcd"; CHECK(as_utf8(s) == "abcd"); }