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

[temp.deduct.call] wording #517

Closed
brevzin opened this issue Jul 8, 2015 · 3 comments
Closed

[temp.deduct.call] wording #517

brevzin opened this issue Jul 8, 2015 · 3 comments
Assignees

Comments

@brevzin
Copy link
Contributor

brevzin commented Jul 8, 2015

Paragraph 3 reads:

"If P is a cv-qualified type, the top level cv-qualifiers of P's type are ignored for type deduction. If P is a reference type, the type referred to by P is used for type deduction."

The wording could be improved to make it clearer that the two sentences are mutually exclusive. Perhaps "Otherwise, if P is a reference type, ..." Or potentially reversing the two sentences: "If P is a reference type.... Otherwise, if P is a cv-qualified type, ..."

@jwakely
Copy link
Member

jwakely commented Jul 8, 2015

It's not strictly necessary, because references cannot be cv-qualified.

@dyp-cpp
Copy link

dyp-cpp commented Jul 8, 2015

It caused some confusion here (in Barry's and Anton Savin's answer), so I suggested it might be clarified. Barry originally thought the removal of cv-qualification causes type deduction to recur with the non-cv-qualified type; Anton might have though both sentences apply as well -- in any case, both seem to have though that P == T const& will get stripped to P == T instead of P == T const. That's why I suggested it might be worthwhile to clarify it.

@brevzin
Copy link
Contributor Author

brevzin commented Jul 8, 2015

At the very least, the section could use an example. We get 7 examples for initializer lists, 3 for forwarding reference, but none for the "standard" cases - which aren't necessarily trivial.

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

No branches or pull requests

4 participants