operator<,<=,>,>=(std::basic_const_iterator<Iter>)
Min standard notice:
Compare a basic_const_iterator with another value. These function templates are used when the left operand is not a basic_const_iterator.
# Declarations
template< /*not-a-const-iterator*/ I >
friend constexpr bool operator<( const I& x, const basic_const_iterator& y )
requires std::random_access_iterator<Iter> && std::totally_ordered_with<Iter, I>;
(since C++23)
template< /*not-a-const-iterator*/ I >
friend constexpr bool operator>( const I& x, const basic_const_iterator& y )
requires std::random_access_iterator<Iter> && std::totally_ordered_with<Iter, I>;
(since C++23)
template< /*not-a-const-iterator*/ I >
friend constexpr bool operator<=( const I& x, const basic_const_iterator& y )
requires std::random_access_iterator<Iter> && std::totally_ordered_with<Iter, I>;
(since C++23)
template< /*not-a-const-iterator*/ I >
friend constexpr bool operator>=( const I& x, const basic_const_iterator& y )
requires std::random_access_iterator<Iter> && std::totally_ordered_with<Iter, I>;
(since C++23)
# Parameters
x, y: iterators to compare
# Notes
If the left operand is a basic_const_iterator, the member comparison functions are used.
# Example
#include <iterator>
int main()
{
static int arr[1];
static constexpr std::basic_const_iterator<int*> it = std::end(arr);
static_assert(arr < it);
}