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

pipe adaptor support for tuple_algorithm.hpp #1808

Open
haleyk10198 opened this issue Jan 8, 2024 · 0 comments
Open

pipe adaptor support for tuple_algorithm.hpp #1808

haleyk10198 opened this issue Jan 8, 2024 · 0 comments

Comments

@haleyk10198
Copy link

Hi,

I am aware of tuples are, will, and should never be considered as a view #1247 .

I am also most thankful of the utilities provided in <utility/tuple_algorithm.hpp>, namely the tuple transform / apply / fold / for_each.
To my understanding, since pipe operator support comes from view_adaptor, the utilities don't come with fluent syntax, i.e.

ranges::tuple_for_each(std::tuple{1, 2, "3"}, std::identity {}); // OK
std::tuple{1, 2, "3"} | ranges::tuple_for_each(std::identity {}); // ERROR -- no pipe!

I am curious if it is possible for one to implement a tuple_adaptor concept,
or what's the fundamental gap that led us to the point where the library ( and the std ) only support view_adaptor instead of exposing a more general T_adaptor concept

Thanks in advance

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

1 participant