equal_to<T>

Category: functors

Component type: type

Description

Equal_to<T> is a function object. Specifically, it is an
Adaptable Binary Predicate, which means it is a function
object that tests the truth or falsehood of some condition.
If f is an object of class
equal_to<T> and x and y are objects of class T, then
f(x,y) returns true if x == y and false otherwise.

Example

Rearrange a vector such that all of the elements that are equal to
zero precede all nonzero elements.