P2321R2: Added std::views::zip_transform.#3322
P2321R2: Added std::views::zip_transform.#3322StephanTLavavej merged 45 commits intomicrosoft:mainfrom
std::views::zip_transform.#3322Conversation
Updated the fork to the current main.
frederick-vs-ja
left a comment
There was a problem hiding this comment.
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>
frederick-vs-ja
left a comment
There was a problem hiding this comment.
Some changes are needed to conform to [range.zip.transform.overview]/2.
strega-nil-ms
left a comment
There was a problem hiding this comment.
Minor changes requested
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_transformfrom P2321R2 as described in the C++ Working Draft. The following defect reports (DRs) and revisions from #2252 have also been implemented:std::views::zip_transformonly, 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_transformcustomization 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.