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
-
true
iflhs
is less than or equal torhs
according to the described rules; otherwise,false
. -
true
if the optional is disengaged or less than or equal torhs
; otherwise,false
. -
true
if the optional is engaged andlhs
is less than or equal to its value; otherwise,false
.
Created with MrDocs