5 #ifndef VCCC_RANGES_RBEGIN_HPP_
6 #define VCCC_RANGES_RBEGIN_HPP_
30 using vccc::detail::tag_1;
31 using vccc::detail::tag_2;
32 using vccc::detail::tag_3;
34 struct rbegin_niebloid {
37 template<
typename T,
typename =
void>
38 struct rbegin_member_check : std::false_type {};
41 : input_or_output_iterator<decltype(vccc_decay_copy( std::declval<T>().rbegin() )) > {};
43 template<
typename T,
bool = is_
class_or_enum<remove_cvref_t<T>>::value,
typename =
void>
44 struct rbegin_global_check : std::false_type {};
47 : input_or_output_iterator<decltype(vccc_decay_copy( rbegin(std::declval<T>()) ))> {};
50 struct common_bidi_check : std::false_type {};
52 struct common_bidi_check<T, true> : bidirectional_iterator<decltype( ranges::begin(std::declval<T>()) )> {};
55 using rbegin_tag = conditional_tag<rbegin_member_check<T>, rbegin_global_check<T>, common_bidi_check<T>>;
58 constexpr
auto run(T&& t, tag_1)
const {
63 constexpr
auto run(T&& t, tag_2)
const {
68 constexpr
auto run(T&& t, tag_3)
const {
73 template<
typename T, std::enable_if_t<conjunction<
74 vccc::detail::not_incomplete_array<T>,
76 std::is_lvalue_reference<std::remove_cv_t<T>>,
77 enable_borrowed_range<std::remove_cv_t<T>>
81 constexpr
auto operator()(T&& t)
const {
82 return run(std::forward<T>(t), rbegin_tag<T>{});
98 using namespace niebloid;
#define vccc_decay_copy(x)
Definition: decay_copy.hpp:12
constexpr VCCC_INLINE_OR_STATIC detail::rbegin_niebloid rbegin
Definition: rbegin.hpp:93
constexpr VCCC_INLINE_OR_STATIC detail::end_niebloid end
returns a sentinel indicating the end of a range
Definition: end.hpp:120
std::integral_constant< bool, v > bool_constant
Definition: bool_constant.hpp:19
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35