std::ranges::drop_view<V>:: end
From cppreference.net
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
|
constexpr
auto
end
(
)
requires
(
!
/*simple-view*/
<
V
>
)
;
|
(1) | (C++20 이후) |
|
constexpr
auto
end
(
)
const
requires
ranges::
range
<
const
V
>
;
|
(2) | (C++20 이후) |
센티넬 또는
drop_view
의 끝을 나타내는 반복자를 반환합니다.
반환값
ranges::
end
(
base_
)
.
예제
이 코드 실행
#include <algorithm> #include <iostream> #include <iterator> #include <ranges> int main() { namespace ranges = std::ranges; constexpr char url[]{"https://cppreference.net"}; const auto p = std::distance(ranges::begin(url), ranges::find(url, '/')); auto site = ranges::drop_view{url, p + 2}; // 접두사 "https://"를 제거 for (auto it = site.begin(); it != site.end(); ++it) std::cout << *it; std::cout << '\n'; }
출력:
cppreference.net
참고 항목
|
시작을 가리키는 반복자를 반환합니다
(public member function) |
|
|
(C++20)
|
범위의 시작을 가리키는 반복자를 반환합니다
(customization point object) |
|
(C++20)
|
범위의 끝을 나타내는 센티널을 반환합니다
(customization point object) |