3 #ifndef _BCP_SET_INTERSECTS_H
4 #define _BCP_SET_INTERSECTS_H
13 template <
class _InputIter1,
class _InputIter2>
14 const bool intersects(_InputIter1 __first1, _InputIter1 __last1,
15 _InputIter2 __first2, _InputIter2 __last2) {
16 while (__first1 != __last1 && __first2 != __last2)
17 if (*__first2 < *__first1)
19 else if(*__first1 < *__first2)
33 template <
class _InputIter1,
class _InputIter2,
class _Compare>
34 const bool intersects(_InputIter1 __first1, _InputIter1 __last1,
35 _InputIter2 __first2, _InputIter2 __last2,
37 while (__first1 != __last1 && __first2 != __last2)
38 if (__comp(*__first2, *__first1))
40 else if(__comp(*__first1, *__first2))
const bool intersects(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
Intersection tester using operator< for comparison.