4 ms·
It's valid in all versions of C++, I believe. It's usually motivated with a chained ternary operator: return a == ALPHA ? x : a == BETA ? y :
by pdw 15y ago
It's valid in all versions of C++, I believe. It's usually motivated with a chained ternary operator:
return a == ALPHA ? x :
a == BETA ? y :
a == GAMMA ? z :
throw ...;
Although that's not a style I'd recommend.