constexpr auto end()
requires (!simple-view<V>); // (1) C++23
constexpr auto end() const
requires range<const V> &&
input_range<range_reference_t<const V>> &&
range<const Pattern>; // (2) C++23
概要
番兵を取得する。
戻り値
- (1), (2) :
join_with_view
の番兵を返す
例
#include <ranges>
#include <vector>
#include <string>
#include <iostream>
int main() {
std::vector<std::string> words = {"hello", "world", "join"};
std::string delimiter = "-";
std::ranges::join_with_view r{words, delimiter};
auto it = r.begin();
auto end_it = r.end();
while (it != end_it) {
char x = *it;
std::cout << x;
++it;
}
std::cout << std::endl;
}
出力
hello-world-join
バージョン
言語
- C++23
処理系
- Clang: ??
- GCC: 13.2 ✅
- ICC: ??
- Visual C++: ??