Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-29 Thread Martin Jambor
Hello, On Sat, Aug 27 2022, Richard Biener wrote: >> Am 26.08.2022 um 23:45 schrieb Martin Jambor : >> >> Hi, >> >>> On Fri, Aug 26 2022, Richard Sandiford wrote: >>> Richard Biener writes: > Am 26.08.2022 um 18:40 schrieb Martin Jambor : > > Hi, > > This adds a method to bi

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Richard Biener via Gcc-patches
> Am 26.08.2022 um 23:45 schrieb Martin Jambor : > > Hi, > >> On Fri, Aug 26 2022, Richard Sandiford wrote: >> Richard Biener writes: Am 26.08.2022 um 18:40 schrieb Martin Jambor : Hi, This adds a method to binary search in a sorted array_slice. The imp

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
Hi, On Fri, Aug 26 2022, Richard Sandiford wrote: > Richard Biener writes: >>> Am 26.08.2022 um 18:40 schrieb Martin Jambor : >>> >>> Hi, >>> >>> This adds a method to binary search in a sorted array_slice. >>> >>> The implementation is direct copy of vec:bsearch. Moreover, to only >>> copy

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
Hi, On Fri, Aug 26 2022, Richard Biener wrote: >> Am 26.08.2022 um 18:40 schrieb Martin Jambor : >> >> Hi, >> >> This adds a method to binary search in a sorted array_slice. >> >> The implementation is direct copy of vec:bsearch. Moreover, to only >> copy it once and not twice, I used const_c

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: >> Am 26.08.2022 um 18:40 schrieb Martin Jambor : >> >> Hi, >> >> This adds a method to binary search in a sorted array_slice. >> >> The implementation is direct copy of vec:bsearch. Moreover, to only >> copy it once and not twice, I used const_cast in the non-const >>

Re: [PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Richard Biener via Gcc-patches
> Am 26.08.2022 um 18:40 schrieb Martin Jambor : > > Hi, > > This adds a method to binary search in a sorted array_slice. > > The implementation is direct copy of vec:bsearch. Moreover, to only > copy it once and not twice, I used const_cast in the non-const > variants to be able to use the

[PATCH 2/2] vec: Add array_slice::bsearch

2022-08-26 Thread Martin Jambor
Hi, This adds a method to binary search in a sorted array_slice. The implementation is direct copy of vec:bsearch. Moreover, to only copy it once and not twice, I used const_cast in the non-const variants to be able to use the const variants. I hope that is acceptable abuse of const_cast but I'