https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86184
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|WAITING |NEW Summary|Shall gcc support this |Conditional expression with |feature? |omitted operand cannot use | |rvalue of type convertible | |to bool --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: struct X { operator bool() { return true; } }; X x; X y = X() ? X() : x; X z = X() ? : y; tern.cc:7:15: error: lvalue required as unary ‘&’ operand X z = X() ? : y; ^ tern.cc:7:7: error: could not convert ‘X()’ from ‘X’ to ‘bool’ X z = X() ? : y; ^~~ The manual says the conditional expression with the omitted operand should "perfectly equivalent" to the first one.