src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp in passenger-6.0.8 vs src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp in passenger-6.0.9

- old
+ new

@@ -9,10 +9,11 @@ // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_MOVE_MERGE_HPP #define BOOST_MOVE_MERGE_HPP +#include <boost/core/ignore_unused.hpp> #include <boost/move/algo/move.hpp> #include <boost/move/adl_move_swap.hpp> #include <boost/move/algo/detail/basic_op.hpp> #include <boost/move/detail/iterator_traits.hpp> #include <boost/move/detail/destruct_n.hpp> @@ -678,11 +679,11 @@ BOOST_ASSERT((last - first) == (r_first - dest_first)); while ( first != last ) { if (r_first == r_last) { InputOutIterator end = op(forward_t(), first, last, dest_first); BOOST_ASSERT(end == r_last); - (void)end; + boost::ignore_unused(end); return; } else if (comp(*r_first, *first)) { op(r_first, dest_first); ++r_first; @@ -715,11 +716,11 @@ BOOST_ASSERT((dest_last - last) == (r_last - r_first)); while( r_first != r_last ) { if(first == last) { BidirOutIterator res = op(backward_t(), r_first, r_last, dest_last); BOOST_ASSERT(last == res); - (void)res; + boost::ignore_unused(res); return; } --r_last; --last; if(comp(*r_last, *last)){ @@ -779,11 +780,11 @@ d.incr(); } d.release(); InputOutIterator end = ::boost::move(first, last, original_r_first); BOOST_ASSERT(end == r_last); - (void)end; + boost::ignore_unused(end); return; } else if (comp(*r_first, *first)) { ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*r_first)); d.incr(); @@ -797,54 +798,9 @@ ++dest_first; } d.release(); merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp); } - -/* -// [r_first, r_last) are already in the right part of the destination range. -// [dest_first, r_first) is uninitialized memory -template <class Compare, class BidirOutIterator, class BidirIterator> -void uninitialized_merge_with_left_placed - ( BidirOutIterator dest_first, BidirOutIterator r_first, BidirOutIterator r_last - , BidirIterator first, BidirIterator last - , Compare comp) -{ - BOOST_ASSERT((last - first) == (r_last - r_first)); - typedef typename iterator_traits<BidirOutIterator>::value_type value_type; - BidirOutIterator const original_r_last = r_last; - - destruct_n<value_type> d(&*dest_last); - - while ( first != last && dest_first != original_r_first ) { - if (r_first == r_last) { - for(; dest_first != original_r_first; ++dest_first, ++first){ - ::new(&*dest_first) value_type(::boost::move(*first)); - d.incr(); - } - d.release(); - BidirOutIterator end = ::boost::move(first, last, original_r_first); - BOOST_ASSERT(end == r_last); - (void)end; - return; - } - else if (comp(*r_first, *first)) { - ::new(&*dest_first) value_type(::boost::move(*r_first)); - d.incr(); - ++r_first; - } - else { - ::new(&*dest_first) value_type(::boost::move(*first)); - d.incr(); - ++first; - } - ++dest_first; - } - d.release(); - merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp); -} -*/ - /// This is a helper function for the merge routines. template<typename BidirectionalIterator1, typename BidirectionalIterator2> BidirectionalIterator1 rotate_adaptive(BidirectionalIterator1 first,