Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Patrick Palka via Gcc-patches
we can easily get at the > > underlying storage for the object and directly initialize it with '*__i' > > and avoid the move. How does the the following adjustment to the patch > > look? > > Looks good to me, thanks. Here's what I ended up committing, complet

Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Jonathan Wakely via Gcc-patches
On 30/04/21 12:43 -0500, Tim Song via Libstdc++ wrote: On Fri, Apr 30, 2021 at 12:11 PM Patrick Palka via Libstdc++ wrote: + template + _Tp& + _M_emplace_deref(const _Iter& __i) + { + this->reset(); + return this->emplace(*__i); + } T

Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Jonathan Wakely via Gcc-patches
On 30/04/21 17:34 -0400, Patrick Palka via Libstdc++ wrote: On Fri, 30 Apr 2021, Tim Song wrote: On Fri, Apr 30, 2021 at 12:11 PM Patrick Palka via Libstdc++ wrote: > > + template > + _Tp& > + _M_emplace_deref(const _Iter& __i) > + { > + this->reset(); >

Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Patrick Palka via Gcc-patches
On Fri, 30 Apr 2021, Tim Song wrote: > On Fri, Apr 30, 2021 at 12:11 PM Patrick Palka via Libstdc++ > wrote: > > > > + template > > + _Tp& > > + _M_emplace_deref(const _Iter& __i) > > + { > > + this->reset(); > > + return this->emplace(*__i); > >

Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Tim Song via Gcc-patches
On Fri, Apr 30, 2021 at 12:11 PM Patrick Palka via Libstdc++ wrote: > > + template > + _Tp& > + _M_emplace_deref(const _Iter& __i) > + { > + this->reset(); > + return this->emplace(*__i); > + } This incurs a move, avoiding of which is the

Re: [PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Jonathan Wakely via Gcc-patches
On 30/04/21 10:38 -0400, Patrick Palka via Libstdc++ wrote: This implements the wording changes of "join_view should join all views of ranges". Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK, thanks. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__non_propa

[PATCH] libstdc++: Implement P2328 changes to join_view

2021-04-30 Thread Patrick Palka via Gcc-patches
This implements the wording changes of "join_view should join all views of ranges". Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__non_propating_cache): Define as per P2328. (join_view): Remove constra