mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix find_symmetric_difference
If distance(first1, lat1) > distance(first2, last2), the find_symmetric_difference caused an infinite loop. cf. http://melpon.org/wandbox/permlink/Ca87oxrYGg6gAugj
This commit is contained in:
parent
6a9cda9d4c
commit
924a33bc50
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ namespace sprout {
|
|||
InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits<InputIterator1>::difference_type n
|
||||
)
|
||||
{
|
||||
return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current
|
||||
return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current
|
||||
: sprout::detail::find_symmetric_difference_impl(
|
||||
sprout::detail::find_symmetric_difference_impl_1(
|
||||
current,
|
||||
|
|
Loading…
Reference in a new issue