Namespaces
Variants

std::ranges::iota_view<W, Bound>::end

cppreference.net에서
 
 
Ranges 라이브러리
Range 어댑터
 
 
constexpr auto end() const;
(1) (C++20부터)
constexpr /*iterator*/ end() const requires std::same_as<W, Bound>;
(2) (C++20부터)
1) 센티널 값을 나타내는 sentinel을 얻습니다:
  • Bound이(가) std::unreachable_sentinel_t인 경우, std::unreachable_sentinel을(를) 반환합니다.
  • 그렇지 않으면, sentinel {bound_ }을(를) 반환합니다.
2) 센티널 값에 대한 iterator를 얻습니다.

반환값

1) 위에서 명시된 대로.
2) iterator  { bound_  }

예제

#include <iostream>
#include <ranges>
int main()
{
    auto iota{std::views::iota(2, 6)};
    auto end{iota.end()};
    for (auto iter{iota.begin()}; iter != end; ++iter)
        std::cout << *iter << ' ';
    std::cout << '\n';
}

출력:

2 3 4 5