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

consider moving [declval]p4 inside the itemdescr #4266

Closed
zygoloid opened this issue Oct 2, 2020 · 3 comments · Fixed by #4290
Closed

consider moving [declval]p4 inside the itemdescr #4266

zygoloid opened this issue Oct 2, 2020 · 3 comments · Fixed by #4290
Assignees

Comments

@zygoloid
Copy link
Member

zygoloid commented Oct 2, 2020

[declval]p4 appears to be an example for the declval function, so should be indented with the rest of the function's detailed description.

@zygoloid
Copy link
Member Author

zygoloid commented Oct 2, 2020

Also, "participates in overloading" should be "participates in overload resolution".

@jwakely
Copy link
Member

jwakely commented Oct 2, 2020

Arguably the example goes with [declval] p1 by showing an example of using declval to simplify the definition of expressions which occur as unevaluated operands. Indenting it as part of the itemdescr seems equally correct though.

As for the second point, that is obviously an improvement. But ... is it actually correct for the library to talk about function templates not participating in overload resolution because of deduction failures? They still participate, in that they are in the initial candidate set, deduction fails, and they are removed from the set. Isn't that failed deduction part of overload resolution? Would it be more precise to replace "only participates in overload resolution if" with "is removed from the candidate set during overload resolution unless"?

Not in scope for C++20 obviously. But if we wanted to change it, there are only a handful of places to change in the library now. The introduction of the Constraints: element in [structure.specification] replaced nearly 300 occurrences of "shall not participate in overload resolution unless".

@jensmaurer
Copy link
Member

jensmaurer commented Oct 6, 2020

Let's fix the narrow issue with declval here. @jwakely, if you feel we should revisit the phrasing "participates in overload resolution", please create a separate, dedicated issue marked "decision-required".

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 a pull request may close this issue.

3 participants