includes

C/C++ Reference

includes
Syntax:
  #include <algorithm>
  bool includes( iterator start1, iterator end1, iterator start2, iterator end2 );
  bool includes( iterator start1, iterator end1, iterator start2, iterator end2, StrictWeakOrdering cmp );

The includes() algorithm returns true if every element in [start2,end2) is also in [start1,end1). Both of the given ranges must be sorted in ascending order.

By default, the < operator is used to compare elements. If the strict weak ordering function object cmp is given, then it is used instead.

includes() runs in linear time.

Related topics: