ifElse cannot (always) contain a 'return' statement
The following code snippet fails to compile
bool foo = true;
Hybrid::ifElse(foo, [&](auto id)
{
return 0;
});
Reason: this is turned into a run-time if-then-else construct, with else clause being an empty lambda [&}(auto id){} (in hybridutilitites.hh:356. There, the if-branch returns int, and the else-branch returns void, and the compiler doesn't like it.
I think this can be fixed by having a separate implementation of ifElse-without-an-else-clause.