set_intersection

The function set_intersection is used to process the intersection of two ranges.

  template<class InputIterator1, 
  class InputIterator2, class OutputIterator>
  OutputIterator set_intersection
  (InputIterator1 first1, InputIterator1 last1,
  InputIterator2 first2, InputIterator2 last2,
  OutputIterator result);
  template<class InputIterator1, 
  class InputIterator2, class OutputIterator,
  class Compare>
  OutputIterator set_intersection
  (InputIterator1 first1, InputIterator1 last1,
  InputIterator2 first2, InputIterator2 last2,
  OutputIterator result, Compare comp);
  
Remarks

The end of the constructed range is returned.