This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch libstdc++] Fix assignability check in uninitialized_copy


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]