This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Open status.
Section: 23.3.3 [string.view.template] Status: Open Submitter: Antony Polukhin Opened: 2018-02-19 Last modified: 2020-09-06
View other active issues in [string.view.template].
View all other issues in [string.view.template].
View all issues with Open status.
It is known that we cannot disable move construction of basic_string_view from rvalues of basic_string, because it breaks a valid use case:
string foo(); void bar(string_view ); bar(foo());
Though it is still possible to disable an absolutely wrong case of assigning an rvalue basic_string to basic_string_view:
string_view sw = "Hello"; sw = foo();
Some tests that make sure that other use cases are not affected are available here
[2018-06-18 after reflector discussion]
Priority set to 2; status to LEWG
[2020-05-28; LEWG issue reviewing]
LEWG issue processing voted to reject 3068 as NAD. Status change to Open.
SF F N A SA 15 5 1 0 0
This wording is relative to N4727.
Change 23.3.3 [string.view.template], class template basic_string_view synopsis, as indicated:
[…] // 188.8.131.52 [string.view.cons], construction and assignment constexpr basic_string_view() noexcept; constexpr basic_string_view(const basic_string_view&) noexcept = default; constexpr basic_string_view& operator=(const basic_string_view&) noexcept = default; constexpr basic_string_view(const charT* str); constexpr basic_string_view(const charT* str, size_type len); […]