Reading up on C++17 and now multiple initializations inside if statement is possible:
if (int x = func(), y = func2(); x > 0 && y > 0)
{
}
Nice one, also in combination with another feature in C++17, structured bindings:
if (auto[iter, success] = set.insert("Hello"); success)
{ }
else
{ }
But combining both features does not compile in VisualStudio 2017.
if (auto[iter, success] = set.insert("Hello"), [iter2, success2] = set.insert("Foo"); success && success2)
{}
else
{}
missing ';' before ','
Is this is a bug in VS2017 or is this not possible?