Disable adl for iterator_to_raw_pointer

This commit is contained in:
Ion Gaztañaga
2017-04-07 16:02:33 +02:00
parent a70bbaa0e0
commit 7c6e036240

View File

@@ -101,21 +101,21 @@ void insertion_sort_uninitialized_copy
typedef typename iterator_traits<BirdirectionalIterator>::value_type value_type; typedef typename iterator_traits<BirdirectionalIterator>::value_type value_type;
if (first1 != last1){ if (first1 != last1){
BirdirectionalRawIterator last2 = first2; BirdirectionalRawIterator last2 = first2;
::new(iterator_to_raw_pointer(last2), boost_move_new_t()) value_type(move(*first1)); ::new((iterator_to_raw_pointer)(last2), boost_move_new_t()) value_type(move(*first1));
destruct_n<value_type, BirdirectionalRawIterator> d(first2); destruct_n<value_type, BirdirectionalRawIterator> d(first2);
d.incr(); d.incr();
for (++last2; ++first1 != last1; ++last2){ for (++last2; ++first1 != last1; ++last2){
BirdirectionalRawIterator j2 = last2; BirdirectionalRawIterator j2 = last2;
BirdirectionalRawIterator k2 = j2; BirdirectionalRawIterator k2 = j2;
if (comp(*first1, *--k2)){ if (comp(*first1, *--k2)){
::new(iterator_to_raw_pointer(j2), boost_move_new_t()) value_type(move(*k2)); ::new((iterator_to_raw_pointer)(j2), boost_move_new_t()) value_type(move(*k2));
d.incr(); d.incr();
for (--j2; k2 != first2 && comp(*first1, *--k2); --j2) for (--j2; k2 != first2 && comp(*first1, *--k2); --j2)
*j2 = move(*k2); *j2 = move(*k2);
*j2 = move(*first1); *j2 = move(*first1);
} }
else{ else{
::new(iterator_to_raw_pointer(j2), boost_move_new_t()) value_type(move(*first1)); ::new((iterator_to_raw_pointer)(j2), boost_move_new_t()) value_type(move(*first1));
d.incr(); d.incr();
} }
} }