-
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
P2321R2: Added std::views::zip_transform
.
#3322
P2321R2: Added std::views::zip_transform
.
#3322
Conversation
Updated the fork to the current main.
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.
I have some thoughts on empty_view
and iterator_category
...
Added the test suite.
Co-authored-by: A. Jiang <de34@live.cn>
Co-authored-by: A. Jiang <de34@live.cn>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: timsong-cpp <rs2740@gmail.com>
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.
Some changes are needed to conform to [range.zip.transform.overview]/2.
This comment was marked as resolved.
This comment was marked as resolved.
Pushed changes to address @strega-nil-ms's comments, plus minor things I noticed along the way:
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
I had to push an additional commit to work around an internal compiler assertion, VSO-1732554 "x86chk assertion failure in immediately invoked lambda computing |
I had to push another commit to work around #1030. The internal build uses native compilers for x86 (eww 🙀 🤮) and The really expensive thing is the matrix of 8 permutations. Instead of skipping everything for |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks for implementing another major view in this paper! 🤐 🔀 😻 |
As a follow up to #3035, this PR implements
std::views::zip_transform
from P2321R2 as described in the C++ Working Draft. The following defect reports (DRs) and revisions from #2252 have also been implemented:std::views::zip_transform
only, since Implement P2494R2 Relaxing Range Adaptors To Allow Move-Only Types #2965 already implemented the paper for existing ranges in the MSVC STL.)One thing to note about the current implementation is that in [range.zip.transform.overview]/2.1.2 of the C++ Working Draft, it is written that
((void)F, auto(views::empty<decay_t<invoke_result_t<FD&>>>))
is a potential equivalent expression when using thestd::views::zip_transform
customization point object. This makes use of the decay-copy language feature proposed in P0849R8, but since that hasn't been implemented yet in the MSVC, the current implementation instead gets the relevant type manually. I would like further input on approaching this problem (use the current solution, wait for compiler support, use the olderdecay-copy()
function, etc.).Lastly, this will be marked as a draft release until test cases are implemented.As always, let me know if you have any questions.