Created on 2018-10-22.00:00:00 last changed 52 months ago
Proposed resolution:
This wording is relative to N4778.
Change [basic.string], class template basic_string synopsis, as indicated:
bool beginstarts_with(basic_string_view<charT, traits> x) const noexcept; bool beginstarts_with(charT x) const noexcept; bool beginstarts_with(const charT* x) const;
Change [string.starts.with] as indicated
bool beginstarts_with(basic_string_view<charT, traits> x) const noexcept; bool beginstarts_with(charT x) const noexcept; bool beginstarts_with(const charT* x) const;-1- Effects: Equivalent to:
return basic_string_view<charT, traits>(data(), size()).beginstarts_with(x);
Change [string.view.template], class template basic_string_view synopsis, as indicated:
constexpr bool beginstarts_with(basic_string_view x) const noexcept; constexpr bool beginstarts_with(charT x) const noexcept; constexpr bool beginstarts_with(const charT* x) const;
Change [string.view.ops] as indicated:
constexpr bool beginstarts_with(basic_string_view x) const noexcept;-20- Effects: Equivalent to: return compare(0, npos, x) == 0;
constexpr bool beginstarts_with(charT x) const noexcept;-21- Effects: Equivalent to: return begin
starts_with(basic_string_view(&x, 1));constexpr bool beginstarts_with(const charT* x) const;-22- Effects: Equivalent to: return begin
starts_with(basic_string_view(x));
[ 2020-08-21; Issue processing telecon: moved to NAD based on LEWG recommendation ]
[ 2020-05-28; LEWG issue reviewing ]
LEWG issue processing voted to reject 3165 as NAD. Status change to Open.
Reject LWG3165 as NAD SF F N A SA 21 1 0 1 0
[ 2018-11: Referred to LEWG after reflector discussion. ]
Throughout the standard library, the opposite of the verb "to end" is "to begin", not to "to start". In this respect, all the overloads of std::basic_string::starts_with and std::basic_string_view::starts_with are named inconsistently. These calls were added in P0457R2, which refers to analogous functions in Java, Python, Qt, LLVM, WebKit, all of which use the term "start". But, in our opinion, the C++ standard library should first be consistent with itself.
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-08-21 20:26:35 | admin | set | messages: + msg11451 |
2020-08-21 20:26:35 | admin | set | status: open -> nad |
2020-05-31 09:54:47 | admin | set | messages: + msg11316 |
2020-05-31 09:54:47 | admin | set | messages: + msg11315 |
2020-05-31 09:54:47 | admin | set | status: lewg -> open |
2018-11-27 04:34:19 | admin | set | status: new -> lewg |
2018-10-25 17:33:27 | admin | set | messages: + msg10168 |
2018-10-22 00:00:00 | admin | create |