Open
Description
Line 4479 in 04ee878
The lhs type is _Out
, while the rhs is iter_difference_t<_It>
.
Line 5489 in ef62d3f
The same goes for ranges::search
.
#include <algorithm>
int* p;
struct O {
using iterator_category = std::contiguous_iterator_tag;
using difference_type = int;
using element_type = int;
element_type& operator*() const;
O& operator++();
O operator++(int);
O& operator--();
O operator--(int);
O& operator+=(difference_type);
O& operator-=(difference_type);
element_type* operator->() const;
element_type& operator[](difference_type) const;
friend O operator+(O, difference_type);
friend O operator+(difference_type, O);
friend O operator-(O, difference_type);
friend difference_type operator-(O, O);
auto operator<=>(const O&) const = default;
void operator+=(decltype(p - p)) = delete;
};
int main() {
std::ranges::reverse_copy(p, p, O{});
std::ranges::search(O{}, O{}, p, p);
}