We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<iterator>
move_sentinel
As the title says, std::move_sentinel could be unwrappable.
std::move_sentinel
Since std::move_sentinel<X> is not unwrappable, it cannot be used with ranges algorithms when corresponding std::move_iterator<X> is unwrappable.
std::move_sentinel<X>
std::move_iterator<X>
#include <algorithm> #include <cassert> #include <iterator> #include <vector> using namespace std; int main() { vector<int> ints = {1, 2, 3}; auto is_positive = [](auto x) { return x > 0; }; assert(ranges::all_of(move_iterator{ints.begin()}, move_sentinel{ints.end()}, is_positive)); }
Expected behavior: This code should compile.
Additional context:
views::as_rvalue
The text was updated successfully, but these errors were encountered:
This is no longer a bug (thanks to #3024), so it should be labelled with enhancement or performance.
enhancement
performance
Sorry, something went wrong.
Relabeled - thanks @JMazurkiewicz!
add unwrapping to move_sentinel
540b8f3
fixes microsoft#3009
Successfully merging a pull request may close this issue.
As the title says,
std::move_sentinel
could be unwrappable.Outdated (fixed by #3024)
Since
std::move_sentinel<X>
is not unwrappable, it cannot be used with ranges algorithms when correspondingstd::move_iterator<X>
is unwrappable.Expected behavior: This code should compile.
Additional context:
views::as_rvalue
#3008.The text was updated successfully, but these errors were encountered: