Open In App

boost::algorithm::equal() in C++ library

The equal() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/equal.hpp’ tests to see if two sequences contain equal values. It returns a boolean value which determines if both the sequences are same or not.

Syntax:



bool equal ( InputIterator1 first1, InputIterator1 second1,
                  InputIterator2 first2, InputIterator2 second2 )
or 
bool equal ( InputIterator1 first1, InputIterator1 second1,
             InputIterator2 first2, InputIterator2 second2, 
             BinaryPredicate pred )

Parameters: The function accepts parameters as described below:

Article Tags :
C++