Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions include/boost/parser/detail/text/transcode_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,24 @@ namespace boost::parser::detail { namespace text {
requires std::sentinel_for<sentinel_type, std::ranges::iterator_t<detail::maybe_const<OtherConst, V>>>
#endif
friend constexpr bool operator==(const iterator<OtherConst> & x,
const sentinel & y);
const sentinel & y)
{ return x.it_ == y.end_; }

template<bool OtherConst>
#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
requires std::sized_sentinel_for<sentinel_type, std::ranges::iterator_t<detail::maybe_const<OtherConst, V>>>
#endif
friend constexpr detail::range_difference_t<detail::maybe_const<OtherConst, V>>
operator-(const iterator<OtherConst> & x, const sentinel & y);
operator-(const iterator<OtherConst> & x, const sentinel & y)
{ return x.it_ - y.end_; }

template<bool OtherConst>
#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
requires std::sized_sentinel_for<sentinel_type, std::ranges::iterator_t<detail::maybe_const<OtherConst, V>>>
#endif
friend constexpr detail::range_difference_t<detail::maybe_const<OtherConst, V>>
operator-(const sentinel & y, const iterator<OtherConst> & x);
operator-(const sentinel & y, const iterator<OtherConst> & x)
{ return y.end_ - x.it_; }

public:
constexpr iterator() = default;
Expand Down
Loading