C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Iterators for basic_string and basic_string_view find functions

From: Yexuan Xiao <bizwen_at_[hidden]>
Date: Fri, 1 Sep 2023 15:19:26 +0000
I disagree with your statement, C++23 added std::ranges::contains_subrange and std::string::contains at the same time, and they do not conflict.
________________________________
From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> on behalf of Jason McKesson via Std-Proposals <std-proposals_at_[hidden]>
Sent: Friday, September 1, 2023 23:06
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Jason McKesson <jmckesson_at_[hidden]>
Subject: Re: [std-proposals] Iterators for basic_string and basic_string_view find functions

On Fri, Sep 1, 2023 at 10:04 AM Yexuan Xiao <bizwen_at_[hidden]> wrote:
>
> std::string requires work with string literals, therefore the member function `size_type find(const CharT* s, size_type pos = 0) const;` is a commonly used version, while std::ranges::find cannot directly achieve the same functionality.

Then your feature suggestion should be restricted to exactly and
*only* those interfaces.
--
Std-Proposals mailing list
Std-Proposals_at_lists.isocpp.org
https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fstd-proposals&data=05%7C01%7C%7C559decf997ea493c5bce08dbaafd131d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638291776156014197%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iiJRoz5Gmm%2F%2FKhEuDb8yQlt5xmFHteOdFwZbDc%2FAA%2F4%3D&reserved=0<https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals>

Received on 2023-09-01 15:19:30