5 #ifndef VCCC_RANGES_VIEWS_COMMON_VIEW_HPP
6 #define VCCC_RANGES_VIEWS_COMMON_VIEW_HPP
45 : base_(
std::move(r)) {}
48 constexpr V
base() const& {
53 return std::move(base_);
65 constexpr
auto end() {
70 constexpr
auto end()
const {
80 constexpr
auto size()
const {
85 template<
typename V2,
typename Base>
86 static constexpr
auto begin_impl(Base&&
base, std::true_type ) {
89 template<
typename V2,
typename Base>
90 static constexpr
auto begin_impl(Base&&
base, std::false_type ) {
94 template<
typename V2,
typename Base>
95 static constexpr
auto end_impl(Base&&
base, std::true_type ) {
98 template<
typename V2,
typename Base>
99 static constexpr
auto end_impl(Base&&
base, std::false_type ) {
100 return common_iterator<iterator_t<V2>, sentinel_t<V2>>(
ranges::end(
base));
106 #if __cplusplus >= 201703L
109 common_view(R&&) -> common_view<views::all_t<R>>;
Definition: common_iterator.hpp:48
Adapts a given view with different types for iterator/sentinel pair into a view that is also a common...
Definition: common_view.hpp:37
constexpr V base() const &
Definition: common_view.hpp:48
constexpr common_view(V r)
Definition: common_view.hpp:44
constexpr auto size() const
Definition: common_view.hpp:80
constexpr auto size()
Definition: common_view.hpp:75
constexpr auto begin()
Definition: common_view.hpp:56
constexpr V base() &&
Definition: common_view.hpp:52
constexpr auto end()
Definition: common_view.hpp:65
constexpr auto end() const
Definition: common_view.hpp:70
constexpr auto begin() const
Definition: common_view.hpp:61
helper class template for defining a view, using the curiously recurring template pattern
Definition: view_interface.hpp:78
constexpr common_view< views::all_t< R > > make_common_view(R &&r)
Definition: common_view.hpp:114
typename ranges::iterator< T >::type iterator_t
Definition: iterator_t.hpp:32
constexpr VCCC_INLINE_OR_STATIC detail::begin_niebloid begin
returns an iterator to the beginning of a range
Definition: begin.hpp:116
constexpr VCCC_INLINE_OR_STATIC detail::size_niebloid size
returns the size of a container or array
Definition: size.hpp:145
constexpr VCCC_INLINE_OR_STATIC detail::end_niebloid end
returns a sentinel indicating the end of a range
Definition: end.hpp:120
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: conjunction.hpp:22
specifies that an object of a type can be copied, moved, and swapped
Definition: copyable.hpp:59
Definition: common_range.hpp:41
Definition: enable_borrowed_range.hpp:17
specifies a range whose iterator type satisfies random_access_iterator
Definition: random_access_range.hpp:48
specifies that a range knows its size in constant time
Definition: sized_range.hpp:38