Skip to content

P2321R2: views::adjacent_transform, views::pairwise_transform - #3546

Merged
Stephan T. Lavavej (StephanTLavavej) merged 14 commits into
microsoft:mainfrom
JMazurkiewicz:adjacent_transform
Mar 17, 2023
Merged

P2321R2: views::adjacent_transform, views::pairwise_transform#3546
Stephan T. Lavavej (StephanTLavavej) merged 14 commits into
microsoft:mainfrom
JMazurkiewicz:adjacent_transform

Conversation

@JMazurkiewicz

@JMazurkiewicz Jakub Mazurkiewicz (JMazurkiewicz) commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

Closes #2252. Implemented features:

TODO
  • Reduce and report Clang bug marked in the code with LLVM-?. Current repro:
    #include <ranges>
    
    auto sum = [](auto... vals) { return (vals + ...); };
    int vals[] = {1, 2, 3, 4, 5};
    auto v = std::views::adjacent_transform<3>(vals, sum);
    There is no need to report this bug, it's been fixed in Clang 16: https://godbolt.org/z/815f371Wc.
  • Reduce and report MSVC bug: _Invoke_result_with_repeated_type_impl had to be implemented as a recursive template (using index sequence caused ICE). See DevCom-10302378,
  • More tests.

@JMazurkiewicz Jakub Mazurkiewicz (JMazurkiewicz) changed the title Adjacent transform P2321R2: views::adjacent_transform, views::pairwise_transform Mar 7, 2023
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added ranges C++20/23 ranges cxx23 C++23 feature labels Mar 7, 2023
@JMazurkiewicz

This comment was marked as outdated.

@fsb4000

This comment was marked as resolved.

Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread tests/std/tests/P2321R2_views_adjacent_transform/test.cpp Outdated
Comment thread tests/std/tests/P2321R2_views_adjacent_transform/test.cpp Outdated
@StephanTLavavej

This comment was marked as resolved.

Comment thread stl/inc/ranges
@JMazurkiewicz

This comment was marked as resolved.

@StephanTLavavej

This comment was marked as resolved.

@strega-nil-ms nicole mazzuca (strega-nil-ms) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor request; will push changes.

never mind.

Comment thread stl/inc/ranges
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 56a65e0 into microsoft:main Mar 17, 2023
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks to you, S. B. Tam (@cpplearner), and Tyler Nichols (@tylerbrawl), the zip paper is now complete! Thank you all!

😻 🤐 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx23 C++23 feature ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2321R2 zip

5 participants