A binary function object that returns true if its first operand is less than its second operand.
true
Standards<ToolKit>
#include <functional> template< class T > struct less : binary_function< T, T, bool >
<
#include <iostream> #include <algorithm> #include <functional> int array[ 4 ] = { 3, 1, 4, 2 }; void main() { sort( array, array + 4, less< int >() ); for ( int i = 0; i < 4; ++i ) cout << array[ i ] << "\n"; } 1 2 3 4
Copyright©1994-2026 Recursion Software LLC All Rights Reserved - For use by licensed users only.