[patch libstdc++] Fix assignability check in uninitialized_copy
Eelis
eelis@eelis.net
Sat Dec 27 23:18:00 GMT 2014
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.
Trivial fix attached. (No tests ran because I'm getting "runtest: command not found" errors that I don't know how to fix.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-uninitialized-copy-assignability-check.patch
Type: text/x-patch
Size: 1368 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141227/0146f113/attachment.bin>
More information about the Libstdc++
mailing list