Date: Fri, 1 Sep 2023 12:33:53 -0400
Adding to the colour's for the bikeshed: find_begin(P)/rfind_begin(P)
(which returns a reverse_iterator).
Can probably even be overloaded to take both an index and an iterator as
the starting position.
On Fri, Sep 1, 2023 at 11:19 Yexuan Xiao via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> 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_[hidden]> 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_[hidden]
>
> 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>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
(which returns a reverse_iterator).
Can probably even be overloaded to take both an index and an iterator as
the starting position.
On Fri, Sep 1, 2023 at 11:19 Yexuan Xiao via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> 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_[hidden]> 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_[hidden]
>
> 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>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2023-09-01 16:34:07