mrdocs::operator<=
Less‐than‐or‐equal operators
Synopses
Declared in <mrdocs/ADT/Optional.hpp>
Checks if the left Optional is less than or equal to the right Optional. Returns true if the left is disengaged or the right is engaged and the left's value is less or equal.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
Optional<U> const& rhs);
Checks if the Optional is less than or equal to a value. Returns true if the Optional is disengaged or its value is less than or equal to rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
U const& rhs);
Checks if a value is less than or equal to an engaged Optional. Returns true if the Optional is engaged and lhs is less than or equal to its value.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator<=(
T const& lhs,
Optional<U> const& rhs);
Return Value
-
trueiflhsis less than or equal torhsaccording to the described rules; otherwise,false. -
trueif the optional is disengaged or less than or equal torhs; otherwise,false. -
trueif the optional is engaged andlhsis less than or equal to its value; otherwise,false.
Created with MrDocs