Type of Conditional C++ Expressions

 

Type of One Operand Type of Other Operand Type of Result
Reference to type Reference to type Reference after usual
Class T Class T Class T
Class T Class X Class type for which a conversion exists. If more than one possible conversion exists, the result is ambiguous.
throw expression Other (type, pointer, reference) Type of the expression that is not a throw expression.

 



Examples of Conditional Expressions


Type Specifiers
Declarators