Annex C (informative) Compatibility [diff]

C.3 C++ and ISO C++ 2011 [diff.cpp11]

C.3.3 Clause [expr]: expressions [diff.cpp11.expr]

Change: A conditional expression with a throw expression as its second or third operand keeps the type and value category of the other operand.

Rationale: Formerly mandated conversions (lvalue-to-rvalue, array-to-pointer, and function-to-pointer standard conversions), especially the creation of the temporary due to lvalue-to-rvalue conversion, were considered gratuitous and surprising.

Effect on original feature: Valid C++ 2011 code that relies on the conversions may behave differently in this International Standard:
struct S {
  int x = 1;
  void mf() { x = 2; }
int f(bool cond) {
  S s;
  (cond ? s : throw 0).mf();
  return s.x;
In C++ 2011, f(true) returns 1.
In this International Standard, it returns 2.
sizeof(true ? "" : throw 0)
In C++ 2011, the expression yields sizeof(const char*).
In this International Standard, it yields sizeof(const char[1]).