|
-
-
-
-
-
-
-
-
-
-
-
-
- #ifndef RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
- #define RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
-
- #include <range/v3/range_fwd.hpp>
-
- #include <range/v3/iterator/concepts.hpp>
-
- namespace ranges
- {
-
-
- struct unreachable_sentinel_t
- {
- template<typename I>
- friend constexpr auto operator==(I const &, unreachable_sentinel_t) noexcept
- -> CPP_broken_friend_ret(bool)(
- requires weakly_incrementable<I>)
- {
- return false;
- }
- template<typename I>
- friend constexpr auto operator==(unreachable_sentinel_t, I const &) noexcept
- -> CPP_broken_friend_ret(bool)(
- requires weakly_incrementable<I>)
- {
- return false;
- }
- template<typename I>
- friend constexpr auto operator!=(I const &, unreachable_sentinel_t) noexcept
- -> CPP_broken_friend_ret(bool)(
- requires weakly_incrementable<I>)
- {
- return true;
- }
- template<typename I>
- friend constexpr auto operator!=(unreachable_sentinel_t, I const &) noexcept
- -> CPP_broken_friend_ret(bool)(
- requires weakly_incrementable<I>)
- {
- return true;
- }
- };
-
- RANGES_INLINE_VARIABLE(unreachable_sentinel_t, unreachable)
-
- namespace cpp20
- {
- using ranges::unreachable;
- using ranges::unreachable_sentinel_t;
- }
-
- }
-
- #endif
|