Open Ioannis-Markos-Angelidakis opened 5 months ago
Isn't std::views::join_with implemented ? Works with gcc 14 and std=c++23
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); }
See https://libcxx.llvm.org/Status/Cxx23.html - it looks like views::join_with is still in progress.
views::join_with
Isn't std::views::join_with implemented ? Works with gcc 14 and
std=c++23