std::ranges::drop_view<V>::end
From cppreference.com
| constexpr auto end() requires (!/*simple-view*/<V>); |
(1) | (C++20以降) |
| constexpr auto end() const requires ranges::range<const V>; |
(2) | (C++20以降) |
drop_view の終端を表すセンチネルまたはイテレーターを返します。
[編集] 戻り値
[編集] 例
このコードを実行
#include <algorithm> #include <iostream> #include <iterator> #include <ranges> int main() { namespace ranges = std::ranges; constexpr char url[]{"https://ja.cppreference.dev"}; const auto p = std::distance(ranges::begin(url), ranges::find(url, '/')); auto site = ranges::drop_view{url, p + 2}; // drop the prefix "https://" for (auto it = site.begin(); it != site.end(); ++it) std::cout << *it; std::cout << '\n'; }
出力
cppreference.com
[編集] 関連項目
| 先頭へのイテレータを返す (public メンバ関数) | |
| (C++20) |
rangeの先頭を指すイテレータを返す (カスタマイゼーションポイントオブジェクト) |
| (C++20) |
rangeの終端を示す番兵を返す (カスタマイゼーションポイントオブジェクト) |