5 #ifndef VCCC_RANGES_VIEWS_ALL_HPP
6 #define VCCC_RANGES_VIEWS_ALL_HPP
26 using vccc::detail::return_category;
30 using return_category_type =
36 std::is_object<std::remove_reference_t<T>>,
37 std::is_lvalue_reference<T>
39 return_category<2, ref_view<std::remove_reference_t<T>>>,
40 return_category<3, owning_view<std::remove_reference_t<T>>>
43 template<
typename R,
typename T>
44 constexpr T operator()(R&& r, return_category<1, T>)
const {
45 return std::forward<R>(r);
48 template<
typename R,
typename T>
49 constexpr T operator()(R&& r, return_category<2, T>)
const {
50 return {std::forward<R>(r)};
53 template<
typename R,
typename T>
54 constexpr T operator()(R&& r, return_category<3, T>)
const {
55 return {std::forward<R>(r)};
62 constexpr
typename return_category_type<R&&>::return_type
64 return (*
this)(std::forward<R>(r), return_category_type<R&&>{});
87 using namespace niebloid;
all_adaptor_closure()=default
constexpr return_category_type< R && >::return_type operator()(R &&r) const
Definition: all.hpp:63
typename detail::all_t_impl< R >::type all_t
Calculates the suitable view type of a viewable_range type.
Definition: all.hpp:107
constexpr VCCC_INLINE_OR_STATIC detail::all_adaptor_closure all
a view that includes all elements of a range
Definition: all.hpp:82
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: conjunction.hpp:22
helper base class template for defining a range adaptor closure object
Definition: range_adaptor_closure.hpp:96
specifies that a type is a range, that is, it provides a begin iterator and an end sentinel
Definition: range.hpp:53
specifies that a range is a view, that is, it has constant time copy/move/assignment
Definition: view.hpp:31
decltype(views::all(std::declval< R >())) type
Definition: all.hpp:93