Fix PR#35119 : set_union misbehaves with move_iterators. Thanks to Denis Yaroshevskiy for both the bug report and the fix.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5547,9 +5547,9 @@ __set_union(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
}
|
||||
else
|
||||
{
|
||||
*__result = *__first1;
|
||||
if (!__comp(*__first1, *__first2))
|
||||
++__first2;
|
||||
*__result = *__first1;
|
||||
++__first1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user