Re: [committed] libstdc++: Fix regression in std::move algorithm (PR 93872)

2020-02-25 Thread Jonathan Wakely
On 25/02/20 16:01 +0200, Ville Voutilainen wrote: On Tue, 25 Feb 2020 at 15:36, Jonathan Wakely wrote: I think what I'd really like to do is get rid of __memmove entirely. We already have code that does the explicit assignment in a loop, for the cases where we can't use __builtin_memmove becaus

Re: [committed] libstdc++: Fix regression in std::move algorithm (PR 93872)

2020-02-25 Thread Ville Voutilainen
On Tue, 25 Feb 2020 at 15:36, Jonathan Wakely wrote: > I think what I'd really like to do is get rid of __memmove entirely. > We already have code that does the explicit assignment in a loop, for > the cases where we can't use __builtin_memmove because the type is not > trivially copyable. > > We

Re: [committed] libstdc++: Fix regression in std::move algorithm (PR 93872)

2020-02-25 Thread Jonathan Wakely
On 25/02/20 12:40 +, Jonathan Wakely wrote: The std::move and std::move_backward algorithms dispatch to the std::__memmove helper when appropriate. That function uses a pointer-to-const for the source values, preventing them from being moved. The two callers of that function have the same pro

Re: [committed] libstdc++: Fix regression in std::move algorithm (PR 93872)

2020-02-25 Thread Jonathan Wakely
On 25/02/20 12:40 +, Jonathan Wakely wrote: The std::move and std::move_backward algorithms dispatch to the std::__memmove helper when appropriate. That function uses a pointer-to-const for the source values, preventing them from being moved. The two callers of that function have the same pro

[committed] libstdc++: Fix regression in std::move algorithm (PR 93872)

2020-02-25 Thread Jonathan Wakely
The std::move and std::move_backward algorithms dispatch to the std::__memmove helper when appropriate. That function uses a pointer-to-const for the source values, preventing them from being moved. The two callers of that function have the same problem. Rather than altering __memmove and its call