.\" ident @(#)greater_equal.3 .\" Standard Template Library .\" $$RW_INSERT_HEADER "slyrs.man" .TH greater_equal 3C++ "02 Apr 1998" "Rogue Wave Software" "-" .ce2 Standard C++ Library Copyright 1998, Rogue Wave Software, Inc. .SH NAME \f2greater_equal\fP \ - A binary function object that returns \f2true\fP if its first argument is greater than or equal to its second .SH SYNOPSIS .RE .RS 0 #include .br template .br struct greater_equal ; : binary_function { .RE .RS 1 bool operator() (const T&, const T&) const; .RE .RS 0 }; .SH DESCRIPTION greater_equal is a binary function object. Its \f2operator()\fP returns \f2true\fP if \f2x\fP is greater than or equal to \f2y\fP. You can pass a greater_equal object to any algorithm that requires a binary function. For example, the sort algorithm can accept a binary function as an alternate comparison object to sort a sequence. greater_equal would be used in that algorithm in the following manner: .br vector vec1; .br . .br . .br sort(vec1.begin(), vec1.end(),greater_equal()); After this call to sort, \f2vec1\fP is sorted in descending order. .SH WARNINGS If your compiler does not support default template parameters, then you always need to supply the \f2Allocator\fP template argument. For instance, you have to write: \f2vector >\fP instead of \f2vector\fP If your compiler does not support namespaces, then you do not need the using declaration for \f2std\fP. .SH SEE ALSO Function_Objects