Skip to content

Commit

Permalink
Fix MSVC 2022 in C++20 mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzlaine committed Dec 22, 2023
1 parent 9c0e078 commit 88a7b39
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions include/boost/parser/detail/text/transcode_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,12 +947,22 @@ namespace boost::parser::detail { namespace text {
{
return *it == detail::iter_value_t<I>{};
}
#if !BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
#if !defined(__cpp_impl_three_way_comparison)
template<typename I>
friend constexpr auto operator==(null_sentinel_t, I it)
{
return *it == detail::iter_value_t<I>{};
}
template<typename I>
friend constexpr auto operator!=(I it, null_sentinel_t)
{
return *it != detail::iter_value_t<I>{};
}
template<typename I>
friend constexpr auto operator!=(null_sentinel_t, I it)
{
return *it != detail::iter_value_t<I>{};
}
#endif
};

Expand Down Expand Up @@ -2773,8 +2783,8 @@ namespace boost::parser::detail { namespace text {
}
}

#if !BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
friend constexpr bool operator!=(
#if !defined(__cpp_impl_three_way_comparison)
friend BOOST_PARSER_CONSTEXPR bool operator!=(
std::enable_if_t<is_forward<I>, utf_iterator> lhs, utf_iterator rhs)
{ return !(lhs == rhs); }
#endif
Expand All @@ -2794,8 +2804,8 @@ namespace boost::parser::detail { namespace text {
}
}

#if !BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
friend constexpr bool operator!=(utf_iterator lhs, S rhs)
#if !defined(__cpp_impl_three_way_comparison)
friend BOOST_PARSER_CONSTEXPR bool operator!=(utf_iterator lhs, S rhs)
{ return !(lhs == rhs); }
#endif

Expand Down

0 comments on commit 88a7b39

Please sign in to comment.