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

Relax indirect callable constraints #1706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jehelset
Copy link

@jehelset jehelset commented Jun 18, 2022

Introduces a new indirect-callable-trait called indirect_value_t to ensure correct value-type computation for algorithms that take projections. Instead of forming a reference to the invoke-result of the projection, it now computes the invoke-result of the projection with a reference to the iterators value-type.

Projections are discriminated from iterators by the existence of a nested typedef indirect_value_type.

More details here:
https://jehelset.gitlab.io/cpp/relaxing-ranges-just-a-smidge/

I was a bit unsure what was the idiomatic way to check for the existence of a nested member-type in ranges-v3.

Introduces a new indirect-callable-trait called 'indirect_value_t'
to ensure correct value-type computation for algorithms that take
projections. Instead of forming a reference to the invoke-result
of the projection, it now computes the invoke-result of the
projection with a reference to the iterators value-type.
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.

1 participant