6#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_RANGES_SIZE_HPP_
7#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_RANGES_SIZE_HPP_
19#include "arene/base/ranges/detail/is_sized_sentinel_for.hpp"
21#include "arene/base/stdlib_choice/declval.hpp"
22#include "arene/base/stdlib_choice/enable_if.hpp"
23#include "arene/base/stdlib_choice/forward.hpp"
24#include "arene/base/stdlib_choice/is_integral.hpp"
25#include "arene/base/stdlib_choice/make_unsigned.hpp"
26#include "arene/base/stdlib_choice/remove_cv.hpp"
27#include "arene/base/stdlib_choice/remove_reference.hpp"
36namespace size_detail {
41auto size() ->
void =
delete;
46template <
typename Range>
51template <
typename Range>
56template <
typename Range>
65extern constexpr bool is_integer_like_v = std::is_integral<remove_cvref_t<T>>::value;
69template <
typename Range>
74template <
typename Range>
89 can_use_member_size_v<Range> && is_integer_like_v<member_size_t<Range>> && !disabled_v<Range>>> =
nullptr>
90 static constexpr auto impl(Range&& range, priority_tag<2>)
noexcept(
104 can_use_adl_size_v<Range> && is_integer_like_v<adl_size_t<Range>> && !disabled_v<Range>>> =
nullptr>
105 static constexpr auto impl(Range&& range, priority_tag<1>)
noexcept(
126 static constexpr auto impl(Range&& range, priority_tag<0>)
noexcept(
142 template <
typename Range>
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition external_vector.hpp:803
typedef iterator_t
The type of the iterator for a given range.
Definition begin_end.hpp:186
constexpr bool disable_sized_range_v
Accessor for the value of disable_sized_range .
Definition accumulate.hpp:37
constexpr std::integral_constant< std::size_t, N > array< T, N >::size
Definition array.hpp:534
constexpr bool substitution_succeeds
Determines if a template can be instantiated successfully, similar to C++20's requires clause.
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
typename iter_difference_t_detail::iter_difference_t_impl< remove_cvref_t< Itr > >::type iter_difference_t
Computes the difference type of the given iterator type.
Definition iter_difference_t.hpp:87
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 make_unsigned< Type >::type make_unsigned_t
A type alias for the equivalent unsigned type for integral and enumeration types other than bool.
Definition make_unsigned.hpp:252
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