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

Why isn't repeat_n a range adaptor? #1824

Open
Mick235711 opened this issue Jul 6, 2024 · 0 comments
Open

Why isn't repeat_n a range adaptor? #1824

Mick235711 opened this issue Jul 6, 2024 · 0 comments

Comments

@Mick235711
Copy link

Currently, views::repeat_n is a range factory that cannot be piped into:

std::vector vec{1, 2, 3};
views::repeat_n(vec, 2); // [[1, 2, 3], [1, 2, 3]]

So this naturally raises the question: why isn't repeat_n an adaptor, such that vec | views::repeat_n(2) is also valid?

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