Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp =================================================================== --- libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -85,8 +85,10 @@ for (auto const & TC : CompareTestCases) { const path p1(TC.LHS); const path p2(TC.RHS); - const std::string R(TC.RHS); - const std::string_view RV(TC.RHS); + std::string RHS(TC.RHS); + const path::string_type R(RHS.begin(), RHS.end()); + const std::basic_string_view RV(R); + const path::value_type *Ptr = R.c_str(); const int E = TC.expect; { // compare(...) functions DisableAllocationGuard g; // none of these operations should allocate @@ -94,7 +96,7 @@ // check runtime results int ret1 = normalize_ret(p1.compare(p2)); int ret2 = normalize_ret(p1.compare(R)); - int ret3 = normalize_ret(p1.compare(TC.RHS)); + int ret3 = normalize_ret(p1.compare(Ptr)); int ret4 = normalize_ret(p1.compare(RV)); g.release();