7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_RANGES_BEGIN_END_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_RANGES_BEGIN_END_HPP_
17#include "arene/base/ranges/detail/is_input_or_output_iterator.hpp"
18#include "arene/base/ranges/detail/is_sentinel_for.hpp"
20#include "arene/base/stdlib_choice/cstddef.hpp"
21#include "arene/base/stdlib_choice/declval.hpp"
22#include "arene/base/stdlib_choice/enable_if.hpp"
23#include "arene/base/stdlib_choice/extent.hpp"
24#include "arene/base/stdlib_choice/forward.hpp"
25#include "arene/base/stdlib_choice/is_array.hpp"
26#include "arene/base/stdlib_choice/is_constructible.hpp"
27#include "arene/base/stdlib_choice/is_lvalue_reference.hpp"
28#include "arene/base/stdlib_choice/is_same.hpp"
29#include "arene/base/stdlib_choice/remove_cv.hpp"
30#include "arene/base/stdlib_choice/remove_extent.hpp"
31#include "arene/base/stdlib_choice/remove_reference.hpp"
32#include "arene/base/stdlib_choice/tuple.hpp"
33#include "arene/base/stdlib_choice/tuple_size.hpp"
42namespace begin_end_detail {
45using adl_priority_tag = priority_tag<0U>;
47using member_priority_tag = priority_tag<1U>;
49using std_array_priority_tag = priority_tag<2U>;
51using size_zero_tuple_like_priority_tag = priority_tag<3U>;
53using c_array_priority_tag = priority_tag<4U>;
56template <
typename Policy>
86 template <
typename Rng, constra
ints<std::enable_if_t<std::is_array<std::remove_reference_t<Rng>>::value>> =
nullptr>
87 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, c_array_priority_tag)
noexcept
104 ARENE_NODISCARD static constexpr auto impl(Rng&&, size_zero_tuple_like_priority_tag)
noexcept -> Itr {
122 std::enable_if_t<std::is_same<BeginItr, GetItr>::value>> =
nullptr>
123 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, std_array_priority_tag)
noexcept -> GetItr {
137 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, member_priority_tag)
noexcept(
153 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, adl_priority_tag)
noexcept(
185template <
typename Rng>
188namespace begin_end_detail {
199 template <
typename Rng, constra
ints<std::enable_if_t<std::is_array<std::remove_reference_t<Rng>>::value>> =
nullptr>
200 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, c_array_priority_tag)
noexcept
218 ARENE_NODISCARD static constexpr auto impl(Rng&&, size_zero_tuple_like_priority_tag)
noexcept -> Itr {
238 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, std_array_priority_tag)
noexcept -> BeginItr {
255 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, member_priority_tag)
noexcept(
271 ARENE_NODISCARD static constexpr auto impl(Rng&& rng, adl_priority_tag)
noexcept(
305template <
typename Rng>
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
obtains the size of an array type along a specified dimension
Definition extent.hpp:89
static constexpr value_type value
Definition integral_constant.hpp:34
obtain the number of elements in a tuple-like type
Definition tuple_size.hpp:22
Definition external_vector.hpp:803
typedef iterator_t
The type of the iterator for a given range.
Definition begin_end.hpp:186
typedef sentinel_t
The type of the sentinel (end iterator) for a given range.
Definition begin_end.hpp:306
constexpr bool enable_borrowed_range_v
Query if a range type has opted into being a borrowed range.
Definition accumulate.hpp:37
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
remove_cv_t< remove_reference_t< T > > remove_cvref_t
Backport of std::remove_cvref_t.
Definition remove_cvref.hpp:35
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...
typename remove_extent< T >::type remove_extent_t
Removes the first extent from the given array type.
Definition remove_extent.hpp:66
constexpr auto get(pair< T1, T2 > &values) noexcept -> tuple_element_t< I, pair< T1, T2 > > &
access an element of a pair
Definition pair.hpp:665
constexpr auto begin(Element(&array)[Size]) noexcept -> Element *
Obtain a pointer to the first element of the array.
Definition begin.hpp:28
constexpr auto forward(remove_reference_t< T > &value) noexcept -> T &&
Cast a value to an rvalue if T is an rvalue or rvalue reference, otherwise forward an lvalue referenc...
Definition forward.hpp:24
#define ARENE_NODISCARD
An alias for [[nodiscard]] , or a no-op if the attribute is not supported.
Definition nodiscard.hpp:26