Summary
This episode demonstrates structured bindings, a powerful new feature in C++17 that simplifies working with compound data structures. Jason shows the evolution of code dealing with std::map::insert() results across C++ standards, from the verbose C++03 approach that required explicit typing and multi-level accessing, through C++11's auto improvements, to C++17's elegant structured bindings. He demonstrates how structured bindings work with pairs, tuples, and structs, and showcases their synergy with other C++17 features like if-initializer statements for cleaner, more maintainable code.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[map]40% match