"`P2467R1 <https://wg21.link/P2467R1>`__","LWG","Support exclusive mode for ``fstreams``","July 2022","",""
"`P2474R2 <https://wg21.link/P2474R2>`__","LWG","``views::repeat``","July 2022","",""
"`P2494R2 <https://wg21.link/P2494R2>`__","LWG","Relaxing range adaptors to allow for move only types","July 2022","",""
-"`P2499R0 <https://wg21.link/P2499R0>`__","LWG","``string_view`` range constructor should be ``explicit``","July 2022","",""
+"`P2499R0 <https://wg21.link/P2499R0>`__","LWG","``string_view`` range constructor should be ``explicit``","July 2022","|Complete|","16.0"
"`P2502R2 <https://wg21.link/P2502R2>`__","LWG","``std::generator``: Synchronous Coroutine Generator for Ranges","July 2022","",""
"`P2508R1 <https://wg21.link/P2508R1>`__","LWG","Exposing ``std::basic-format-string``","July 2022","",""
"`P2513R4 <https://wg21.link/P2513R4>`__","LWG","``char8_t`` Compatibility and Portability Fixes","July 2022","",""
typename remove_reference_t<_Range>::traits_type;
} || is_same_v<typename remove_reference_t<_Range>::traits_type, _Traits>)
)
- constexpr _LIBCPP_HIDE_FROM_ABI
+ constexpr explicit _LIBCPP_HIDE_FROM_ABI
basic_string_view(_Range&& __r) : __data(ranges::data(__r)), __size(ranges::size(__r)) {}
#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// Test that we're not trying to use the type's conversion operator to string_view in the constructor.
{
const DeletedConversionOperator d;
- std::basic_string_view<char> csv = d;
+ std::basic_string_view<char> csv = std::basic_string_view<char>(d);
assert(csv == "test");
}
{
DeletedConstConversionOperator dc;
- std::basic_string_view<char> sv = dc;
+ std::basic_string_view<char> sv = std::basic_string_view<char>(dc);
assert(sv == "test");
}
}
#endif
+static_assert(!std::is_convertible_v<std::vector<char>, std::string_view>);
+
int main(int, char**) {
test();
static_assert(test());
contiguous_iterator<const char16_t*> begin() const { return contiguous_iterator<const char16_t*>(data_); }
contiguous_iterator<const char16_t*> end() const { return contiguous_iterator<const char16_t*>(data_ + 3); }
};
- std::basic_string_view bsv = Widget();
+ std::basic_string_view bsv = std::basic_string_view(Widget());
ASSERT_SAME_TYPE(decltype(bsv), std::basic_string_view<char16_t>);
}