std::ranges::borrowed_iterator_t, std::ranges::borrowed_subrange_t
定义于头文件 <ranges>
|
||
template<ranges::range R> using borrowed_iterator_t = std::conditional_t<range::borrowed_range<R>, |
(1) | (C++20 起) |
template<ranges::range R> using borrowed_subrange_t = std::conditional_t<range::borrowed_range<R>, |
(2) | (C++20 起) |
某些有制约算法用此二模板别名避免返回潜在悬垂的迭代器或视图。
参阅
占位类型,指示不应返回迭代器或子范围,因为它可能悬垂 (类) |