[#bsl-operator_lt-016] = xref:bsl.adoc[bsl]::operator< :relfileprefix: ../ :mrdocs: Less‐than operators == Synopses Declared in `<bslstl_optional.h>` Return `true` if the specified `lhs` iterator is earlier in the underlying sequence than the specified `rhs` iterator, and `false` otherwise. The behavior is undefined if `lhs` and `rhs` do not iterate over the same sequence, or if the (template parameter) type `ITERATOR` is not a random access iterator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool xref:bsl/operator_lt-03.adoc[operator<]( xref:bsl/vector_UintPtrConversionIterator.adoc[vector_UintPtrConversionIterator] const& lhs, xref:bsl/vector_UintPtrConversionIterator.adoc[vector_UintPtrConversionIterator] const& rhs); ---- [.small]#xref:bsl/operator_lt-03.adoc[_» more..._]# Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs` `optional` object, and `false` otherwise. `lhs` is ordered before `rhs` if `lhs` is disengaged and `rhs` is engaged or if both are engaged and `lhs.value()` is ordered before `rhs.value()`. This function can be called in constant expressions only if neither `t_LHS_TYPE` nor `t_RHS_TYPE` is allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_lt-0b.adoc[operator<]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_lt-0b.adoc[_» more..._]# Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs`, and `false` otherwise. `lhs` is ordered before `rhs` if `lhs` is disengaged or `lhs.value()` is ordered before `rhs`. This function can be called in constant expressions only if `t_LHS_TYPE` is not allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_lt-00.adoc[operator<]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, t_RHS_TYPE const& rhs); ---- [.small]#xref:bsl/operator_lt-00.adoc[_» more..._]# Return `true` if the specified `lhs` is ordered before the specified `rhs` `optional` object, and `false` otherwise. `lhs` is ordered before `rhs` if `rhs` is engaged and `lhs` is ordered before `rhs.value()`. This function can be called in constant expressions only if `t_RHS_TYPE` is not allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_lt-06.adoc[operator<]( t_LHS_TYPE const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_lt-06.adoc[_» more..._]# Return `true` if the specified `lhs` optional object is ordered before the specified `rhs` optional object, and `false` otherwise. `lhs` is ordered before `rhs` if `lhs` is disengaged and `rhs` is engaged or if both are engaged and `lhs.value()` is ordered before `rhs.value()`. Note that this function will fail to compile if `t_LHS_TYPE` and `t_RHS_TYPE` are not compatible. These functions can be called in constant expressions only if the `bsl::optional`'s value type is not allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_lt-010.adoc[operator<]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, std::optional<t_RHS_TYPE> const& rhs); ---- [.small]#xref:bsl/operator_lt-010.adoc[_» more..._]# Compare a `std::optional` with a `bsl::optional` using less‐than. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_lt-01f.adoc[operator<]( std::optional<t_LHS_TYPE> const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_lt-01f.adoc[_» more..._]# Return whether the specified stacks compare lexicographically; see the non‐member `operator<` in the `bsl` namespace. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool xref:bsl/operator_lt-08.adoc[operator<]( xref:bsl/stack-05.adoc[stack<VAL, CONT>] const&, xref:bsl/stack-05.adoc[stack<VAL, CONT>] const&); ---- [.small]#xref:bsl/operator_lt-08.adoc[_» more..._]# Return `true` if the value of the specified `lhs` stack is lexicographically less than that of the specified `rhs` stack, and `false` otherwise. Given iterators `i` and `j` over the respective sequences `[lhs.begin() .. lhs.end())]` and `[rhs.begin() .. rhs.end())]`, the value of stack `lhs` is lexicographically less than that of stack `rhs` if `true == *i < *j` for the first pair of corresponding iterator positions where `*i < *j` and `*j < *i` are not both `false`. If no such corresponding iterator position exists, the value of `lhs` is lexicographically less than that of `rhs` if `lhs.size() < rhs.size()`. This method requires that `operator<`, inducing a total order, be defined for `value_type`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class CONTAINER> bool xref:bsl/operator_lt-0c.adoc[operator<]( xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>] const& lhs, xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>] const& rhs); ---- [.small]#xref:bsl/operator_lt-0c.adoc[_» more..._]# Return `true` if the index of the active alternative in the specified `lhs` is less than that of the specified `rhs`, or if both have the same active alternative and the contained value of `lhs` compares less than that of `rhs`, or if `lhs` is valueless by exception and `rhs` is not; otherwise, return `false`. All alternatives shall support `operator<`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_HEAD, class... t_TAIL> bool xref:bsl/operator_lt-01d.adoc[operator<]( xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const& lhs, xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const& rhs); ---- [.small]#xref:bsl/operator_lt-01d.adoc[_» more..._]# Return whether the specified queues compare lexicographically; see the non‐member `operator<` in the `bsl` namespace. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool xref:bsl/operator_lt-0e1.adoc[operator<]( xref:bsl/queue-0a5.adoc[queue<VALUE2, CONTAINER2>] const&, xref:bsl/queue-0a5.adoc[queue<VALUE2, CONTAINER2>] const&); ---- [.small]#xref:bsl/operator_lt-0e1.adoc[_» more..._]# Return `true` if the value of the specified `lhs` queue is lexicographically less than that of the specified `rhs` queue, and `false` otherwise. Given iterators `i` and `j` over the respective sequences `[lhs.begin() .. lhs.end())]` and `[rhs.begin() .. rhs.end())]`, the value of queue `lhs` is lexicographically less than that of queue `rhs` if `true == *i < *j` for the first pair of corresponding iterator positions where `*i < *j` and `*j < *i` are not both `false`. If no such corresponding iterator position exists, the value of `lhs` is lexicographically less than that of `rhs` if `lhs.size() < rhs.size()`. This method requires that `operator<`, inducing a total order, be defined for `value_type`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class CONTAINER> bool xref:bsl/operator_lt-0ef.adoc[operator<]( xref:bsl/queue-0a5.adoc[queue<VALUE, CONTAINER>] const& lhs, xref:bsl/queue-0a5.adoc[queue<VALUE, CONTAINER>] const& rhs); ---- [.small]#xref:bsl/operator_lt-0ef.adoc[_» more..._]# Return `true` if `__x` is lexicographically less than `__y`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Tp, class _Alloc> bool xref:bsl/operator_lt-05.adoc[operator<]( xref:bsl/slist.adoc[slist<_Tp, _Alloc>] const& __x, xref:bsl/slist.adoc[slist<_Tp, _Alloc>] const& __y); ---- [.small]#xref:bsl/operator_lt-05.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#