| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | |||||||||
| |||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
constexpr/*iterator*/<false> begin() requires(!(/*simple-view*/<Views>&& ...)); | (1) | (since C++26) |
constexpr/*iterator*/<true> begin()const requires(ranges::range<const Views>&& ...)&& | (2) | (since C++26) |
Returns aniterator to the beginning of theconcat_view.
iterator <false> it(this,std::in_place_index<0>, ranges::begin(std::get<0>(views_ ))); satisfy <0>();iterator <true> it(this,std::in_place_index<0>, ranges::begin(std::get<0>(views_ ))); satisfy <0>();As specified above.
The preliminary version can be checked out onCompiler Explorer.
#include <ranges>#include <string_view>usingnamespace std::literals; int main(){staticconstexprauto c={"🐱","🐶"};staticconstexprauto a={"🤡"sv};staticconstexprauto t={"💚"sv};staticconstexprauto cat{std::views::concat(c, a, t)}; static_assert(*cat.begin()=="\U0001F431" and cat.begin()[1]=="🐶" and*(cat.begin()+2)=="\N{CLOWN FACE}");}
| returns an iterator or a sentinel to the end (public member function)[edit] | |
(C++20) | returns an iterator to the beginning of a range (customization point object)[edit] |