In Lua, you can do this:
foo = a and b or c and d or e
Which is equivalent to (at least I am pretty sure it is equivalent to):
local foo = nil
if a then
foo = b
elseif c then
foo = d
else
foo = e
end
Is there anything equivalent or similar to this in C++?