| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | |||||||||
| |||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
constexprauto end() requires(!(/*simple-view*/<Views>&& ...)); | (1) | (since C++26) |
constexprauto end()const requires(ranges::range<const Views>&& ...)&& | (2) | (since C++26) |
Returns aniterator orstd::default_sentinel that compares equal to the past-the-end iterator of theconcat_view.
constexprauto N= sizeof...(Views);
ifconstexpr(ranges::common_range<Views...[N-1]>) return iterator <false>(this,std::in_place_index<N-1>, ranges::end(std::get<N-1>(views_ )));
else returnstd::default_sentinel;
constexprauto N= sizeof...(Views);
ifconstexpr(ranges::common_range<const Views...[N-1]>) return iterator <true>(this,std::in_place_index<N-1>, ranges::end(std::get<N-1>(views_ )));
else returnstd::default_sentinel;
As described above.
The preliminary version can be checked out onCompiler Explorer.
#include <concepts>#include <iterator>#include <ranges> int main(){staticconstexprint p[]{37,42,69};staticconstexprauto q={19937,1729};constexprauto cat= std::ranges::views::concat(p, q); static_assert(notstd::same_as<std::default_sentinel_t, decltype(cat.end())>); static_assert(cat.end()[-1]==1729);}
| returns an iterator to the beginning (public member function)[edit] | |
(C++20) | returns a sentinel indicating the end of a range (customization point object)[edit] |