Standard C++ Library Class Reference
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
equal
Algorithm
Summary
Compares two ranges for equality.
Contents
Synopsis●
Description●
Complexity●
Example●
Warnings●
Synopsis
#include <algorithm>
template <class InputIterator1, class InputIterator2>
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2);
template <class InputIterator1, class InputIterator2,
class BinaryPredicate>
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, BinaryPredicate binary_pred);
Description
The equal algorithm does a pairwise comparison of all of the elements in one range with all of
the elements in another range to see if they match. The first version of equal uses the equal
operator (==) as the comparison function, and the second version allows you to specify a binary