Skip to content
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

[oneDPL] Fix the function signatures to not require std::projected_value_t #619

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

akukanov
Copy link
Contributor

Another oversight found in the signatures of range algorithms: std::projected_value_t requires C++26.

To overcome the issue, it is replaced with an analogous alias added only for exposition (i.e., not as a public API) and defined in terms of C++20.

For comparison, this is the standard definition of std::projected_value_t:

template<indirectly_readable I, indirectly_regular_unary_invocable<I> Proj>
using projected_value_t = // freestanding
  remove_cvref_t<invoke_result_t<Proj&, iter_value_t<I>&>>;

It's a backward-compatible bug fix. Ideally it should be added to a revision of the specification v1.4.

Copy link
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.

Other than minor nitpick it LGTM

Co-authored-by: Dan Hoeflinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DPL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants