13 #ifndef RANGES_V3_VIEW_ALL_HPP
14 #define RANGES_V3_VIEW_ALL_HPP
16 #include <type_traits>
25 #include <range/v3/utility/static_const.hpp>
30 #include <range/v3/detail/prologue.hpp>
43 static constexpr
auto from_range_(T && t, std::true_type, detail::ignore_t,
46 return static_cast<T &&
>(t);
52 static constexpr
auto from_range_(T && t, std::false_type, std::true_type,
55 return ranges::views::ref(t);
61 static constexpr
auto from_range_(T && t, std::false_type, std::false_type,
64 return make_subrange(
static_cast<T &&
>(t));
69 requires range<T &> AND viewable_range<T>)
70 constexpr
auto operator()(T && t)
const
72 return all_fn::from_range_(
static_cast<T &&
>(t),
74 std::is_lvalue_reference<T>{},
79 RANGES_DEPRECATED(
"Passing a reference_wrapper to views::all is deprecated.")
80 constexpr
ref_view<T> operator()(std::reference_wrapper<T> r)
const
82 return ranges::views::ref(r.get());
90 template<
typename Rng>
91 using all_t = decltype(all(std::declval<Rng>()));
94 template<
typename Rng>
97 CPP_assert(view_<Rng>);
104 : Rng(detail::move(rng))
112 using ranges::views::all;
113 using ranges::views::all_t;
115 template(
typename Rng)(
116 requires viewable_range<Rng>)
117 using all_view RANGES_DEPRECATED(
118 "Please use ranges::cpp20::views::all_t instead.") =
119 ranges::views::all_t<Rng>;
124 #include <range/v3/detail/epilogue.hpp>
CPP_concept view_
\concept view_
Definition: concepts.hpp:252
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
std::integral_constant< bool, B > bool_
An integral constant wrapper for bool.
Definition: meta.hpp:168