std::ranges::concat_view<Views...>:: begin
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
| Member functions | ||||
|
concat_view::begin
|
||||
| Deduction guides | ||||
| Iterator | ||||
| Member functions | ||||
| Non-member functions | ||||
|
constexpr
/*iterator*/
<
false
>
begin
(
)
requires ( ! ( /*simple-view*/ < Views > && ... ) ) ; |
(1) | (C++26 이후) |
|
constexpr
/*iterator*/
<
true
>
begin
(
)
const
requires
(
ranges::
range
<
const
Views
>
&&
...
)
&&
|
(2) | (C++26 이후) |
iterator
를
concat_view
의 시작 부분으로 반환합니다.
iterator
<
false
>
it
(
this,
std::
in_place_index
<
0
>
,
ranges::
begin
(
std
::
get
<
0
>
(
views_
)
)
)
;
it. template
satisfy
<
0
>
(
)
;
return it ; .
iterator
와 동등함
<
true
>
it
(
this,
std::
in_place_index
<
0
>
,
ranges::
begin
(
std
::
get
<
0
>
(
views_
)
)
)
;
it. template
satisfy
<
0
>
(
)
;
return it ; .
반환값
위에서 명시된 대로.
예제
예비 버전은 Compiler Explorer 에서 확인할 수 있습니다.
#include <ranges> #include <string_view> using namespace std::literals; int main() { static constexpr auto c = {"🐱", "🐶"}; static constexpr auto a = {"🤡"sv}; static constexpr auto t = {"💚"sv}; static constexpr auto cat{std::views::concat(c, a, t)}; static_assert(*cat.begin() == "\U0001F431" and cat.begin()[1] == "🐶" and *(cat.begin() + 2) == "\N{CLOWN FACE}"); }
참고 항목
|
끝을 가리키는 반복자 또는 센티널을 반환합니다
(public member function) |
|
|
(C++20)
|
범위의 시작을 가리키는 반복자를 반환합니다
(customization point object) |