std::ranges::take_while_view<V,Pred>::end
來自 cppreference.com
< cpp | ranges | take_while_view
constexpr auto end() requires (!/*simple-view*/<V>); |
(1) | (C++20 起) |
constexpr auto end() const requires ranges::range<const V> && |
(2) | (C++20 起) |
返回一個表示檢視末尾的哨兵。
設base_
表示底層檢視。
1) 有效地返回/*sentinel*/<false>(ranges::end(base_), std::addressof(pred()))。
2) 有效地返回/*sentinel*/<true>(ranges::end(base_), std::addressof(pred()))。
如果V
是簡單檢視(即,如果V
和const V是具有相同迭代器和哨兵型別的檢視),則過載(1)不參與過載決議。
目錄 |
[編輯] 引數
(無)
[編輯] 返回值
表示檢視末尾的哨兵。
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 缺陷報告
下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。
缺陷報告 | 應用於 | 釋出時的行為 | 正確的行為 |
---|---|---|---|
LWG 3450 | C++20 | const過載可能返回與迭代器不可比較的哨兵 | 已受約束 |
[編輯] 參見
返回指向起始的迭代器 (public member function) | |
(C++20) |
將哨兵與從take_while_view::begin返回的迭代器進行比較 (function) |