-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pass rvalues to _Seek_to
in ranges::uninitialized_(copy|move)_n
#2964
Conversation
...as is necessary to properly unwrap-and-rewrap input iterators. Test `ranges::uninitialized_(copy|move)(_n)?` with iterators that require rvalues to unwrap properly which would have caught this bug. Fixes microsoft#2962.
@@ -275,7 +275,7 @@ struct memcpy_test { | |||
|
|||
template <test::ProxyRef IsProxy> | |||
using test_input = test::range<test::input, int_wrapper, test::Sized::no, test::CanDifference::no, test::Common::no, | |||
test::CanCompare::yes, IsProxy>; | |||
test::CanCompare::no, IsProxy>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This CanCompare
argument directly controls whether the range's iterators can be compared to each other with ==
and !=
, and also happens to determine whether iterators are copyable. We want move-only iterators here since they only rewrap rvalues which would fail to compile without the fix to the product code.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for fixing this bug and enhancing the test coverage! 🐞 😸 🎉 |
...as is necessary to properly unwrap-and-rewrap input iterators. Test
ranges::uninitialized_(copy|move)(_n)?
with iterators that require rvalues to unwrap properly which would have caught this bug.Fixes #2962.