Comment Comment by BudVVeezer It's consistent with for (init; condition;) {} and solves a problem like:if (std::vector<int> v = f(); !v.empty()) { // Use v }without requiring an extra compound statement to limit the scope and lifetime of v. parent BudVVeezer 9 years ago
if (std::vector<int> v = f(); !v.empty()) { // Use v }
without requiring an extra compound statement to limit the scope and lifetime of v.