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

Add support for move-only views #1843

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joka921
Copy link

@joka921 joka921 commented Dec 11, 2024

In C++20, a std::ranges::view either has to be copyable in constant time, or a move-only type. In range-v3, the view concept currently requires the view to be copyable. This PR lifts this restriction, and makes the ::ranges::view concept idential to std::ranges::view.

This allows the implementation of an owning_view that can take ownership of a range that is expensive to copy.
While the owning_view can be implemented outside of range-v3, the proposed (minimal) changes to the view concept are necessary as a first step to bring range-v3 and the C++20 std::ranges closer to each other.

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

Successfully merging this pull request may close these issues.

1 participant