Index: test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp =================================================================== --- test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp +++ test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp @@ -376,7 +376,7 @@ test("abcdefghijklmnopqrst", 5, 5, "", 20); test("abcdefghijklmnopqrst", 0, 8, "abcde", 15); test("abcdefghijklmnopqrst", 0, 12, "abcdefghij", 10); - test("abcdefghijklmnopqrst", 0, -1, "abcdefghijklmnopqrst", 0); + test("abcdefghijklmnopqrst", 0, static_cast(-1), "abcdefghijklmnopqrst", 0); } { @@ -395,7 +395,7 @@ test(L"abcdefghijklmnopqrst", 5, 5, L"", 20); test(L"abcdefghijklmnopqrst", 0, 8, L"abcde", 15); test(L"abcdefghijklmnopqrst", 0, 12, L"abcdefghij", 10); - test(L"abcdefghijklmnopqrst", 0, -1, L"abcdefghijklmnopqrst", 0); + test(L"abcdefghijklmnopqrst", 0, static_cast(-1), L"abcdefghijklmnopqrst", 0); } #if TEST_STD_VER >= 11 @@ -415,7 +415,7 @@ test(U"abcdefghijklmnopqrst", 5, 5, U"", 20); test(U"abcdefghijklmnopqrst", 0, 8, U"abcde", 15); test(U"abcdefghijklmnopqrst", 0, 12, U"abcdefghij", 10); - test(U"abcdefghijklmnopqrst", 0, -1, U"abcdefghijklmnopqrst", 0); + test(U"abcdefghijklmnopqrst", 0, static_cast(-1), U"abcdefghijklmnopqrst", 0); } { @@ -434,7 +434,7 @@ test(u"abcdefghijklmnopqrst", 5, 5, u"", 20); test(u"abcdefghijklmnopqrst", 0, 8, u"abcde", 15); test(u"abcdefghijklmnopqrst", 0, 12, u"abcdefghij", 10); - test(u"abcdefghijklmnopqrst", 0, -1, u"abcdefghijklmnopqrst", 0); + test(u"abcdefghijklmnopqrst", 0, static_cast(-1), u"abcdefghijklmnopqrst", 0); } #endif Index: test/std/strings/string.view/string.view.ops/substr.pass.cpp =================================================================== --- test/std/strings/string.view/string.view.ops/substr.pass.cpp +++ test/std/strings/string.view/string.view.ops/substr.pass.cpp @@ -16,6 +16,8 @@ // Returns: basic_string_view(data()+pos, rlen). #include +#include +#include #include #include "test_macros.h" @@ -39,7 +41,7 @@ #endif const size_t rlen = std::min(n, sv.size() - pos); assert (sv1.size() == rlen); - for (size_t i = 0; i <= rlen; ++i) + for (size_t i = 0; i < rlen; ++i) assert(sv[pos+i] == sv1[i]); }