Skip to content

Add ranges::find_last*#2667

Merged
akukanov merged 11 commits intomainfrom
dev/ranges-find-last-akukanov
Apr 28, 2026
Merged

Add ranges::find_last*#2667
akukanov merged 11 commits intomainfrom
dev/ranges-find-last-akukanov

Conversation

@akukanov
Copy link
Copy Markdown
Contributor

@akukanov akukanov commented Apr 20, 2026

The implementation approach is to redirect to find_if with reverse_view, and then create a proper subrange to return.

@akukanov akukanov changed the title Dev/ranges find last akukanov Add ranges::find_last[_if[_not]] Apr 20, 2026
@akukanov akukanov force-pushed the dev/ranges-find-last-akukanov branch 2 times, most recently from 6de7d40 to 1a2e9a4 Compare April 20, 2026 18:22
@akukanov akukanov force-pushed the dev/ranges-find-last-akukanov branch from 1a2e9a4 to 6efa590 Compare April 20, 2026 18:51
@akukanov akukanov force-pushed the dev/ranges-find-last-akukanov branch from c821cef to 62d0a9c Compare April 20, 2026 19:53
@akukanov akukanov changed the title Add ranges::find_last[_if[_not]] Add ranges::find_last* Apr 21, 2026
@akukanov akukanov marked this pull request as ready for review April 21, 2026 09:41
@akukanov akukanov added this to the 2022.13.0 milestone Apr 21, 2026
Comment thread include/oneapi/dpl/pstl/glue_algorithm_ranges_impl.h Outdated
Copy link
Copy Markdown
Contributor

@dmitriy-sobolev dmitriy-sobolev left a comment

Choose a reason for hiding this comment

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

LGTM

@SergeyKopienko
Copy link
Copy Markdown
Contributor

@akukanov, what about iterator variants of find_last described at https://en.cppreference.com/cpp/algorithm/ranges/find_last ?

@akukanov
Copy link
Copy Markdown
Contributor Author

what about iterator variants of find_last described at https://en.cppreference.com/cpp/algorithm/ranges/find_last ?

We intentionally focus on the range-based API and do not add any iterator variants for range algorithms - so far, including those that have no direct analogues in C++17 (for example, max/min/minmax). The oneDPL specification does not include these either. That can be revisited later in case there is demand.

Copy link
Copy Markdown
Contributor

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@SergeyKopienko SergeyKopienko left a comment

Choose a reason for hiding this comment

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

LGTM

@akukanov akukanov merged commit c0d2a10 into main Apr 28, 2026
22 of 23 checks passed
@akukanov akukanov deleted the dev/ranges-find-last-akukanov branch April 28, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants