std::ranges::chunk_by_view<V,Pred>:: base
From cppreference.net
<
cpp
|
ranges
|
chunk by view
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::chunk_by_view
| Member functions | ||||
|
chunk_by_view::base
|
||||
| Deduction guides | ||||
| Iterator | ||||
|
constexpr
V base
(
)
const
&
requires
std::
copy_constructible
<
V
>
;
|
(1) | (C++23 이후) |
|
constexpr
V base
(
)
&&
;
|
(2) | (C++23 이후) |
기본 뷰
base_
의 복사본을 반환합니다.
1)
기본 뷰에서 결과를 복사 생성합니다. 다음과 동일합니다:
return
base_
;
매개변수
(없음)
반환값
기본 뷰의 복사본입니다.
예제
이 코드 실행
#include <algorithm> #include <functional> #include <ranges> int main() { static constexpr auto v = {1, 1, 2, 2, 3, 3, 3}; constexpr auto chunks = v | std::views::chunk_by(std::equal_to{}); static_assert(std::ranges::equal(v, chunks.base())); }