HomeManualTopicsTypesSymbols

std::less

compares two objects in an object specific way

Parameters

left
the left operand
right
the right operand

Result

less
true if left is smaller than right, false otherwise

Description

The two objects must be of a comparable type.

This function is used to implement the following comparison operators:

a b

is converted by the compiler to

std::less(a b)

a > b

is converted by the compiler to

std::less(b a)

a = b

is converted by the compiler to

std::not(std::less(b a))

a >= b

is converted by the compiler to

std::not(std::less(a b))

Topics

Objects

Numbers

See also

std::equal compares two objects for equality

Implemented by

std_types::character numerically compares the unicodes of the two specified characters
std_types::date_and_time compares two date-and-time objects
std_types::octet_string compares the two strings character by character
std_types::positive_integer returns true if the left argument is less than the right argument
std_types::quad_octet_string compares the two strings character by character
std_types::real implements the *less* operation for real numbers