std::ranges::view::all,std::ranges::all_view (3) - Linux Manuals
std::ranges::view::all,std::ranges::all_view: std::ranges::view::all,std::ranges::all_view
Command to display std::ranges::view::all,std::ranges::all_view
manual in Linux: $ man 3 std::ranges::view::all,std::ranges::all_view
NAME
std::ranges::view::all,std::ranges::all_view - std::ranges::view::all,std::ranges::all_view
Synopsis
template <ViewableRange R> (1) (since C++20)
using all_view = decltype(view::all(std::declval<R>()));
namespace view {
inline constexpr /*unspecified*/ all = /*unspecified*/; (2) (since C++20)
}
A range adaptor that returns a View that includes all elements of its Range argument.
The expression view::all(E) is expression-equivalent (has the same effect) to:
* decay-copy(E) if the decayed type of E models View.
* Otherwise, std::ranges::ref_view{E} if that expression is well-formed
* Otherwise, std::ranges::subrange{E}
Example
// Run this code
#include <ranges>
#include <vector>
#include <iostream>
int main()
{
std::vector<int> v{0,1,2,3,4,5};
for(int n : std::view::all(v) | std::view::take(2) ) {
std::cout << n << ' ';
}
}
Output:
0 1
Pages related to std::ranges::view::all,std::ranges::all_view
- std::ranges::view::counted (3) - std::ranges::view::counted
- std::ranges::view::empty,std::ranges::empty_view (3) - std::ranges::view::empty,std::ranges::empty_view
- std::ranges::view::filter,std::ranges::filter_view (3) - std::ranges::view::filter,std::ranges::filter_view
- std::ranges::view::iota,std::ranges::iota_view (3) - std::ranges::view::iota,std::ranges::iota_view
- std::ranges::view::reverse,std::ranges::reverse_view (3) - std::ranges::view::reverse,std::ranges::reverse_view
- std::ranges::BidirectionalRange (3) - std::ranges::BidirectionalRange
- std::ranges::CommonRange (3) - std::ranges::CommonRange
- std::ranges::ContiguousRange (3) - std::ranges::ContiguousRange
- std::ranges::ForwardRange (3) - std::ranges::ForwardRange
- std::ranges::InputRange (3) - std::ranges::InputRange
- std::ranges::OutputRange (3) - std::ranges::OutputRange
- std::ranges::RandomAccessRange (3) - std::ranges::RandomAccessRange
- std::ranges::Range (3) - std::ranges::Range
- std::ranges::SizedRange,std::ranges::disable_sized_range (3) - std::ranges::SizedRange,std::ranges::disable_sized_range
- std::ranges::View,std::ranges::enable_view,std::ranges::view_base (3) - std::ranges::View,std::ranges::enable_view,std::ranges::view_base
- std::ranges::ViewableRange (3) - std::ranges::ViewableRange
- std::ranges::all_of,std::ranges::any_of,std::ranges::none_of (3) - std::ranges::all_of,std::ranges::any_of,std::ranges::none_of