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