Daily bit(e) of C++ | Init statements
Daily bit(e) of C++ #125, The C++17 (if, switch) and C++20 (range-for) init statements.
Init statements enable fully encapsulated if, switch (C++17) and range-for loop (C++20) statements by adding an additional init section that can be used to create variables with a lifetime matching the statement block.