Affected subclauses: [expr.cond],
[expr.ass], and
[expr.comma]
Change: The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue
. Rationale: C++ is an object-oriented language, placing relatively
more emphasis on lvalues
. For example, function calls may
yield lvalues
. Effect on original feature: Change to semantics of well-defined feature
. Some C
expressions that implicitly rely on lvalue-to-rvalue
conversions will yield different results
. [
Example 6:
char arr[100];
sizeof(0, arr)
yields
100
in C++ and
sizeof(char*)
in C
. —
end example]
Difficulty of converting: Programs must add explicit casts to the appropriate rvalue
.