On this page
std::ranges::borrowed_iterator_t, std::ranges::borrowed_subrange_t
Defined in header <ranges> |
||
|---|---|---|
|
(1) | (since C++20) |
|
(2) | (since C++20) |
2)
std::ranges::subrange<std::ranges::iterator_t<R>> if R models borrowed_range, std::ranges::dangling otherwise.
These two alias templates are used by some constrained algorithms to avoid returning potentially dangling iterators or views.
Possible implementation
| First version |
|---|
|
| Second version |
|
See also
|
(C++20)
|
a placeholder type indicating that an iterator or a subrange should not be returned since it would be dangling (class) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/borrowed_iterator_t