From 75c29c03787cb2a65e53329e197891e52f9afff0 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sun, 29 Sep 2024 13:28:17 -0500 Subject: [PATCH] Add missing implementations for hidden friends in project_view::iterator (op== and op-). Fixes #169. --- include/boost/parser/detail/text/transcode_view.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/boost/parser/detail/text/transcode_view.hpp b/include/boost/parser/detail/text/transcode_view.hpp index e6e34901..a25530d2 100644 --- a/include/boost/parser/detail/text/transcode_view.hpp +++ b/include/boost/parser/detail/text/transcode_view.hpp @@ -176,21 +176,24 @@ namespace boost::parser::detail { namespace text { requires std::sentinel_for>> #endif friend constexpr bool operator==(const iterator & x, - const sentinel & y); + const sentinel & y) + { return x.it_ == y.end_; } template #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::sized_sentinel_for>> #endif friend constexpr detail::range_difference_t> - operator-(const iterator & x, const sentinel & y); + operator-(const iterator & x, const sentinel & y) + { return x.it_ - y.end_; } template #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::sized_sentinel_for>> #endif friend constexpr detail::range_difference_t> - operator-(const sentinel & y, const iterator & x); + operator-(const sentinel & y, const iterator & x) + { return y.end_ - x.it_; } public: constexpr iterator() = default;