Merge pull request #109 from Breakthrough/develop

Get rid of integer overflow in copy_move_algo.hpp (-fsanitize=integer).
This commit is contained in:
Ion Gaztañaga
2019-03-30 12:34:40 +01:00
committed by GitHub

View File

@@ -522,9 +522,9 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
{ {
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n) {
boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f); boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f);
++f; ++r; ++f; ++r; --n;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){