Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: no member named 'join_with' in namespace 'std::ranges::views' #428

Open
Ioannis-Markos-Angelidakis opened this issue May 29, 2024 · 1 comment

Comments

@Ioannis-Markos-Angelidakis

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
Copy link
Owner

See https://libcxx.llvm.org/Status/Cxx23.html - it looks like views::join_with is still in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants