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

[expr.dynamic.cast] has redundant wording #450

Closed
StephanTLavavej opened this issue Mar 10, 2015 · 0 comments
Closed

[expr.dynamic.cast] has redundant wording #450

StephanTLavavej opened this issue Mar 10, 2015 · 0 comments
Assignees

Comments

@StephanTLavavej
Copy link
Contributor

N4296 5.2.7 [expr.dynamic.cast]/2 specifies the value category of dynamic_cast: "If T is a pointer type, [...] the result is a prvalue of type T. If T is an lvalue reference type, [...] the result is an lvalue of the type referred to by T. If T is an rvalue reference type, [...] the result is an xvalue of the type referred to by T."

But then /5 redundantly says: "The result is an lvalue if T is an lvalue reference, or an xvalue if T is an rvalue reference."

There's no reason for the normative wording to repeat itself like this. The redundant sentence in /5 should be dropped. (/2 should be left unchanged, since it explains all three cases.)

jensmaurer added a commit to jensmaurer/draft that referenced this issue Nov 13, 2016
@jensmaurer jensmaurer self-assigned this Nov 13, 2016
tkoeppe pushed a commit that referenced this issue Nov 13, 2016
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

2 participants