diff --git a/stl/inc/xstring b/stl/inc/xstring index 93800fa01b..5810e0b4fa 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -1260,7 +1260,7 @@ public: && (!requires { typename remove_reference_t<_Range>::traits_type; } || same_as::traits_type, _Traits>)) - constexpr basic_string_view(_Range&& _Rng) noexcept( + constexpr explicit basic_string_view(_Range&& _Rng) noexcept( noexcept(_RANGES data(_Rng)) && noexcept(_RANGES size(_Rng))) // strengthened : _Mydata(_RANGES data(_Rng)), _Mysize(static_cast(_RANGES size(_Rng))) {} // clang-format on diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 6ac747f82d..789c661abc 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -316,6 +316,7 @@ // P2441R2 views::join_with // P2442R1 Windowing Range Adaptors: views::chunk, views::slide // P2443R1 views::chunk_by +// P2499R0 string_view Range Constructor Should Be explicit // P2549R0 unexpected::error() // Parallel Algorithms Notes diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 45f0b1ceb2..9fe9b245a3 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -66,6 +66,10 @@ std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp FAIL std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp FAIL std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp FAIL +# libc++ doesn't yet implement P2499R0 +std/strings/string.view/string.view.cons/from_range.pass.cpp FAIL +std/strings/string.view/string.view.deduct/range.pass.cpp FAIL + # libc++ doesn't correctly constrain the iterator_traits specialization for common_iterator (https://reviews.llvm.org/D117449) std/iterators/predef.iterators/iterators.common/iterator_traits.compile.pass.cpp FAIL diff --git a/tests/libcxx/skipped_tests.txt b/tests/libcxx/skipped_tests.txt index 92b7be72bd..af6211e91e 100644 --- a/tests/libcxx/skipped_tests.txt +++ b/tests/libcxx/skipped_tests.txt @@ -66,6 +66,10 @@ utilities\format\format.formatter\format.parse.ctx\begin.pass.cpp utilities\format\format.formatter\format.parse.ctx\ctor.pass.cpp utilities\format\format.formatter\format.parse.ctx\end.pass.cpp +# libc++ doesn't yet implement P2499R0 +strings\string.view\string.view.cons\from_range.pass.cpp +strings\string.view\string.view.deduct\range.pass.cpp + # libc++ doesn't correctly constrain the iterator_traits specialization for common_iterator (https://reviews.llvm.org/D117449) iterators\predef.iterators\iterators.common\iterator_traits.compile.pass.cpp diff --git a/tests/std/tests/P0220R1_string_view/test.cpp b/tests/std/tests/P0220R1_string_view/test.cpp index f7ffb3ee21..c0276895d2 100644 --- a/tests/std/tests/P0220R1_string_view/test.cpp +++ b/tests/std/tests/P0220R1_string_view/test.cpp @@ -352,7 +352,9 @@ constexpr bool test_case_range_constructor() { // Also tests some of the constraints: static_assert(is_constructible_v>); - static_assert(is_convertible_v, string_view>); + + // P2499R0 string_view Range Constructor Should Be explicit + static_assert(!is_convertible_v, string_view>); static_assert(!is_constructible_v>); // not contiguous static_assert(!is_convertible_v, string_view>);