Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/range/v3/iterator/unreachable_sentinel.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /// \file
0002 // Range v3 library
0003 //
0004 //  Copyright Eric Niebler 2014-present
0005 //
0006 //  Use, modification and distribution is subject to the
0007 //  Boost Software License, Version 1.0. (See accompanying
0008 //  file LICENSE_1_0.txt or copy at
0009 //  http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // Project home: https://github.com/ericniebler/range-v3
0012 //
0013 #ifndef RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
0014 #define RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP
0015 
0016 #include <range/v3/range_fwd.hpp>
0017 
0018 #include <range/v3/iterator/concepts.hpp>
0019 
0020 #include <range/v3/detail/prologue.hpp>
0021 
0022 namespace ranges
0023 {
0024     /// \addtogroup group-iterator
0025     /// @{
0026     struct unreachable_sentinel_t
0027     {
0028         template<typename I>
0029         friend constexpr auto operator==(I const &, unreachable_sentinel_t) noexcept
0030             -> CPP_broken_friend_ret(bool)(
0031                 requires weakly_incrementable<I>)
0032         {
0033             return false;
0034         }
0035         template<typename I>
0036         friend constexpr auto operator==(unreachable_sentinel_t, I const &) noexcept
0037             -> CPP_broken_friend_ret(bool)(
0038                 requires weakly_incrementable<I>)
0039         {
0040             return false;
0041         }
0042         template<typename I>
0043         friend constexpr auto operator!=(I const &, unreachable_sentinel_t) noexcept
0044             -> CPP_broken_friend_ret(bool)(
0045                 requires weakly_incrementable<I>)
0046         {
0047             return true;
0048         }
0049         template<typename I>
0050         friend constexpr auto operator!=(unreachable_sentinel_t, I const &) noexcept
0051             -> CPP_broken_friend_ret(bool)(
0052                 requires weakly_incrementable<I>)
0053         {
0054             return true;
0055         }
0056     };
0057 
0058     RANGES_INLINE_VARIABLE(unreachable_sentinel_t, unreachable)
0059 
0060     namespace cpp20
0061     {
0062         using ranges::unreachable;
0063         using ranges::unreachable_sentinel_t;
0064     } // namespace cpp20
0065     /// @}
0066 } // namespace ranges
0067 
0068 #include <range/v3/detail/epilogue.hpp>
0069 
0070 #endif // RANGES_V3_ITERATOR_UNREACHABLE_SENTINEL_HPP