4#ifndef TETL_RANGES_END_HPP
5#define TETL_RANGES_END_HPP
7#include <etl/_iterator/input_or_output_iterator.hpp>
8#include <etl/_iterator/sentinel_for.hpp>
9#include <etl/_ranges/can_borrow.hpp>
10#include <etl/_ranges/decay_copy.hpp>
11#include <etl/_ranges/iterator_t.hpp>
17auto end(
auto&) ->
void =
delete;
18auto end(
auto const&) ->
void =
delete;
21concept has_member_end =
ranges::detail::can_borrow<T>
and requires(T&& t) {
22 { decay_copy(t.end()) } ->
etl::sentinel_for<
etl::
ranges::iterator_t<T>>;
26concept has_adl_end =
not has_member_end<T>
and ranges::detail::can_borrow<T>
and requires(T&& t) {
27 { decay_copy(end(t)) } ->
etl::sentinel_for<
etl::
ranges::iterator_t<T>>;
31 template <
typename T,
etl::size_t Size>
32 requires(
sizeof(T) >= 0)
33 [[nodiscard]]
constexpr auto operator()(T (&t)[Size])
const noexcept
38 template <has_member_end T>
39 [[nodiscard]]
constexpr auto operator()(T&& t)
const noexcept(
noexcept(decay_copy(t.end())))
41 return decay_copy(t.end());
44 template <has_adl_end T>
45 [[nodiscard]]
constexpr auto operator()(T&& t)
const noexcept(
noexcept(decay_copy(end(t))))
47 return decay_copy(end(t));
50 auto operator()(
auto&&)
const ->
void =
delete;
57inline constexpr auto end = end_cpo::fn{};
constexpr auto end
Definition end.hpp:57
Definition ranges_iter_move.hpp:61
Definition ranges_in_fun_result.hpp:12
Definition adjacent_find.hpp:9