This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++/71500] make back reference work with icase
- From: "Tim Shen via libstdc++" <libstdc++ at gcc dot gnu dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Sep 2017 10:58:04 -0700
- Subject: Re: [libstdc++/71500] make back reference work with icase
- Authentication-results: sourceware.org; auth=none
- References: <CAG4ZjN=teuigpysiMSm+tE+3S4dm+WM=7n7A80gXBDFpdqfhBQ@mail.gmail.com> <20170915153954.GH4582@redhat.com> <20170918172617.GI4582@redhat.com>
- Reply-to: Tim Shen <timshen at google dot com>
On Mon, Sep 18, 2017 at 10:26 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>> We need to rewrite this to check the lengths are equal first, and then
>> call the 3-argument version of std::equal.
>>
>> Alternatively, we could move the implementation of the C++14
>> std::equal overloads to __equal and make that available for C++11.
>> I'll try that.
>
>
> Here's a proof of concept patch for that. It's a bit ugly.
Instead of having iterator tags in the interface, we can probe the
random-access-ness inside __equal4/__equal4_p, can't we? It's similar
to the existing "if (_RAIters()) { ... }".
I'd expect the patches to be renaming the current implementations and
adding wrappers, instead of adding new implementations.
--
Regards,
Tim Shen