Horizon
Loading...
Searching...
No Matches
unreachable_sentinel.hpp
Go to the documentation of this file.
1
2// Range v3 library
3//
4// Copyright Eric Niebler 2014-present
5//
6// Use, modification and distribution is subject to the
7// Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10//
11// Project home: https://github.com/ericniebler/range-v3
12//
13#ifndef RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
14#define RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
15
17
19
20#include <range/v3/detail/prologue.hpp>
21
22namespace ranges
23{
27 {
28 template<typename I>
29 friend constexpr auto operator==(I const &, unreachable_sentinel_t) noexcept
30 -> CPP_broken_friend_ret(bool)(
32 {
33 return false;
34 }
35 template<typename I>
36 friend constexpr auto operator==(unreachable_sentinel_t, I const &) noexcept
37 -> CPP_broken_friend_ret(bool)(
39 {
40 return false;
41 }
42 template<typename I>
43 friend constexpr auto operator!=(I const &, unreachable_sentinel_t) noexcept
44 -> CPP_broken_friend_ret(bool)(
46 {
47 return true;
48 }
49 template<typename I>
50 friend constexpr auto operator!=(unreachable_sentinel_t, I const &) noexcept
51 -> CPP_broken_friend_ret(bool)(
53 {
54 return true;
55 }
56 };
57
58 RANGES_INLINE_VARIABLE(unreachable_sentinel_t, unreachable)
59
60 namespace cpp20
61 {
62 using ranges::unreachable;
64 } // namespace cpp20
66} // namespace ranges
67
68#include <range/v3/detail/epilogue.hpp>
69
70#endif // RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
The weakly_incrementable concept.
Definition unreachable_sentinel.hpp:27