includes

Syntax:

    #include <algorithm>
 
    template< typename InIterA, typename InIterB >
    bool includes( InIterA start1, InIterA end1, InIterB start2, InIterB end2 );
 
    template< typename InIterA, typename InIterB, typename StrictWeakOrdering >
    bool includes( InIterA start1, InIterA end1, InIterB start2, InIterB 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 and must not contain duplicate elements.

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: set_difference, set_intersection, set_symmetric_difference, set_union