diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-10-30 15:50:00 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-10-30 15:50:00 +0000 |
commit | 05da5b0205aeada52a6838353d214db3723c79c7 (patch) | |
tree | 2cc8e56888649ff4c4938cd9f475e40bdd6979c7 /libcxx/include/algorithm | |
parent | 4e13d4de52783dbdf9268a01055b546f5176947c (diff) | |
download | bcm5719-llvm-05da5b0205aeada52a6838353d214db3723c79c7.tar.gz bcm5719-llvm-05da5b0205aeada52a6838353d214db3723c79c7.zip |
Fix PR#35119 : set_union misbehaves with move_iterators. Thanks to Denis Yaroshevskiy for both the bug report and the fix.
llvm-svn: 316914
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 282083a89c2..f5776b40400 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -5547,9 +5547,9 @@ __set_union(_InputIterator1 __first1, _InputIterator1 __last1, } else { - *__result = *__first1; if (!__comp(*__first1, *__first2)) ++__first2; + *__result = *__first1; ++__first1; } } |