std::ranges::iota_view<W, Bound>:: end
From cppreference.net
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::iota_view
|
constexpr
auto
end
(
)
const
;
|
(1) | (seit C++20) |
|
constexpr
/*iterator*/
end
(
)
const
requires
std::
same_as
<
W, Bound
>
;
|
(2) | (seit C++20) |
1)
Erhält einen
sentinel
, der den Sentinel-Wert repräsentiert:
-
Wenn
Boundein std::unreachable_sentinel_t ist, wird std:: unreachable_sentinel zurückgegeben. -
Andernfalls wird
sentinel {bound_ } zurückgegeben.
2)
Ruft einen
Iterator
auf den Sentinel-Wert ab.
Rückgabewert
1)
Wie oben angegeben.
Beispiel
Diesen Code ausführen
#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'; }
Ausgabe:
2 3 4 5