Closed
Description
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