Skip to content

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

Closed
@StephanTLavavej

Description

@StephanTLavavej

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.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions