fzort and cdfrey, the conditional (a.k.a ternary) operator doesn't strictly require the second and third operands to have the same type, but it must be possible to convert one operand to the type of the other. In fzort's example both needed to be converted to foo*, neither can be converted to the other type, so it's ill-formed.
(There is another form allowed which doesn't require conversion, where one of the operands is a throw-expression: which ? new foo : throw "catch me". This isn't entirely useless syntactic sugar, it can be used to throw exceptions from constexpr functions, which don't allow if statements.)
