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. Compiler Explorer link: https://lnkd.in/e96MkvMH #cpp #cplusplus #coding #programming #dailybiteofcpp
What, I've never seen that in a switch statement! ❤️👌🏻
You should write a book on C++ modern features. Thanks for sharing.