error: no member named 'join_with' in namespace 'std::ranges::views'
Mark-AAAA opened this issue · 1 comments
Mark-AAAA commented
Isn't std::views::join_with implemented ? Works with gcc 14 and std=c++23
#include <print>
#include <ranges>
#include <string>
std::int32_t main() {
std::string str = R"(%userprofile%\Doc\do\%\%%)";
auto first_split = str | std::views::split('%')
| std::views::take(2)
| std::views::join
| std::ranges::to<std::string>();
auto second_split = str | std::views::split('%')
| std::views::drop(2)
| std::views::join_with('%')
| std::ranges::to<std::string>();
std::string path = first_split + second_split;
std::print("{}\n{}", first_split, second_split);
}
mstorsjo commented
See https://libcxx.llvm.org/Status/Cxx23.html - it looks like views::join_with
is still in progress.