brewbuck, the right hand side is a conditional expression. It evaluates to one expression or the other. There is nothing quantum mechanical about that. It is either one or the other. So I didn't see any reason why the return type can't be the same as the evaluated expression. After all that would make the ternary operator ?: equivalent to an if/else statement. That is, the following two expressions would be the same:

Code:
double b;
long long int c, x;

x = a ? b : c;

if (a) {
  x = b;
} else {
  x = c;
}
But it is not. The else statement is evaluated as x = (long long int) (double) c in the ternary operator. This can make for some obscure bugs. I did find this behavior documented elsewhere, so I'll work around it...