id summary reporter owner description type status milestone component version severity resolution keywords cc 11180 has_set_intersection gast128@… Marshall Clow "We sometimes have the requirement that we are only interested if two ranges have overlap. While in general for ranges this is somewhat difficult, for sorted ranges it seems easy: template bool has_set_intersection(In1 itFirst1, In1 itLast1, In2 itFirst2, In2 itLast2, BinaryPredicate comp) { bool bOverlap = false; while (itFirst1 != itLast1 && itFirst2 != itLast2) { if (comp(*itFirst1, *itFirst2)) { ++itFirst1; } else if (comp(*itFirst2, *itFirst1)) { ++itFirst2; } else { bOverlap = true; break; } } return bOverlap; } Ofc this can be achieved with the normal set_intersection as well but that loops until the end of one of the ranges and requires an extra output iterator functor. Maybe an idea?" Feature Requests new To Be Determined algorithm Boost 1.57.0 Problem