Created on 2018-02-19.00:00:00 last changed 20 months ago
Proposed resolution:
This wording is relative to N4727.
Change [string.view.template], class template basic_string_view synopsis, as indicated:
[…]
// [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;
template <class A>
basic_string_view& operator=(const basic_string<charT, traits, A>&&) = delete;
constexpr basic_string_view(const charT* str);
constexpr basic_string_view(const charT* str, size_type len);
[…]
[ 2022-08-24 Status changed: Open → NAD. ]
LWG telecon: close based on LEWG direction. "This makes string_view depend on basic_string." "Request a paper with implementation if someone really wants this."
[ 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
[ 2018-06-18 after reflector discussion ]
Priority set to 2; status to LEWG
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
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-24 18:54:27 | admin | set | messages: + msg12711 |
2022-08-24 18:54:27 | admin | set | status: open -> nad |
2020-05-31 09:54:47 | admin | set | messages: + msg11313 |
2020-05-31 09:54:47 | admin | set | status: lewg -> open |
2018-06-19 05:49:11 | admin | set | messages: + msg9930 |
2018-06-19 05:49:11 | admin | set | status: new -> lewg |
2018-03-03 14:00:07 | admin | set | messages: + msg9692 |
2018-02-19 00:00:00 | admin | create |