Previously, when the 2 expressions passed to a ternary operator were xvalues and one inherits from the other, the resulting expression had type 'T', not 'T&&' as 5.16p3 dictates. For example:
`
Base b; Derived d;
typedef decltype(true ? static_cast<Base&&>(b) : static_cast<Derived&&>(d)) x; // x has type Base, not Base&&`
Details
Details
- Reviewers
rsmith
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, thanks!
lib/Sema/SemaExprCXX.cpp | ||
---|---|---|
4698 | This should say: "... must bind directly to an lvalue." |
Comment Actions
Fix the wording of the quoted section of the standard. Would you mind committing this? Thanks for reviewing!
This should say: "... must bind directly to an lvalue."