Currently, we can abuse the Elvis operator to get something like this:<code>auto my_foo = foo_new() :? handle_error()<br></code>
but this is not a common thing to do. Normally you would do this:<code>auto my_foo = foo_new();<br><br>if (my_foo != nullptr) {<br> // do something with my_foo<br>} else {<br> // Handle the error<br>}<br></code>
But this leaves the (potentially nullptr) variable my_foo in scope after the if block has run, which is the problem embedding the declaration into the condition solves.