[patch libstdc++] Fix assignability check in uninitialized_copy
Jonathan Wakely
jwakely.gcc@gmail.com
Sun Dec 28 00:52:00 GMT 2014
On 27 December 2014 at 23:18, Eelis wrote:
> std::uninitialized_copy tries to test assignability as follows:
>
> is_assignable<_ValueType1, _RefType>::value
>
> This is the wrong way around. For example, when the iterators are char*,
> this ends up as
>
> is_assignable<char, char&>::value
>
> which is false. It should be
>
> is_assignable<char&, char>::value
>
> which is true.
>
> The result is that uninitialized_copy needlessly picks the slow
> implementation.
Thanks for the patch - it should be sent to this list and the
gcc-patches one too, and tested ...
> Trivial fix attached. (No tests ran because I'm getting "runtest: command
> not found" errors that I don't know how to fix.)
Do you have DejaGnu installed?
More information about the Libstdc++
mailing list