Consequently, to_input_view
never models range concepts that are stronger than input_range
. In particular, it does not model all of these:
Additionally, to_input_view
does not model common_range
. However, it does model borrowed_range
, constant_range
, and sized_range
when the underlying view V
models respective concepts.
V
base_
(private) the underlying view
to_input_view
sized_range
.
sized_range
or forward_range
std::ranges::view_interface<D>
) [edit] returns a constant iterator to the beginning of the range
std::ranges::view_interface<D>
) [edit] returns a sentinel for the constant iterator of the range
std::ranges::view_interface<D>
) [edit] returns whether the derived view is not empty, provided only if ranges::empty is applicable to it
std::ranges::view_interface<D>
) [edit] gets the address of derived view's data, provided only if its iterator type satisfies contiguous_iterator
std::ranges::view_interface<D>
) [edit] returns the first element in the derived view, provided if it satisfies forward_range
std::ranges::view_interface<D>
) [edit] returns the last element in the derived view, provided only if it satisfies bidirectional_range
and common_range
std::ranges::view_interface<D>
) [edit] returns the n
th element in the derived view, provided only if it satisfies random_access_range
std::ranges::view_interface<D>
) [edit] std::ranges::to_input_view::to_input_view (1) (since C++26)
constexpr explicit to_input_view( V base );
(2) (since C++26)1) Value-initializes base_
via its default member initializer (= V()).
2) Initializes base_
with std::move(base).
constexpr V base() &&;
(2) (since C++26)1) Copy-constructs the result from the underlying view. Equivalent to return base_;.
2) Move-constructs the result from the underlying view. Equivalent to return std::move(base_);.
std::ranges::to_input_view::beginconstexpr auto begin() requires (!__simple_view<V>);
(1) (since C++26) (2) (since C++26) 1)Equivalent to
return /*iterator*/<false>(ranges::begin(base_)); 2)Equivalent to
return /*iterator*/<true>(ranges::begin(base_)); std::ranges::to_input_view::endconstexpr auto end() requires (!__simple_view<V>);
(1) (since C++26) (2) (since C++26) std::ranges::to_input_view::size [edit] Deduction guides template< class R >This specialization of std::ranges::enable_borrowed_range makes to_input_view
satisfy borrowed_range
when the underlying view satisfies it.
to_input_view
can be useful to avoid the overhead necessary to provide support for the operations needed for greater iterator strength.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4