C++17 added a feature known as structured bindings, which look like this: auto[a,b,c]=some_aggregate; in this case, the names a, b, and c are bound to members of the initializer. The particular details on how this occurs are not important here, but we can consider the case of std::tuple: intsum(tuple<int,int,int>triple){auto[a,b,c]=triple;returna+b+c;} This is particularly handy when inspecting the elements of a container of pairs: intfoo(map<string,int>mp){for(auto[key,value]:mp){// ...}} La...| vector<bool>{ true, true, false };
Where did that memset come from?| vector-of-bool.github.io
A handy idiom with coroutines, borrowed from Python| vector-of-bool.github.io
It can be easy| vector-of-bool.github.io
Combining strings and templates. What could go wrong?| vector-of-bool.github.io
Using C++20 for my Dream C++ Feature| vector-of-bool.github.io
In which I write a stronger boolean type| vector-of-bool.github.io
In which I present a novel, portable, and nonintrustive approach to build-time configuration| vector-of-bool.github.io
In which I talk about buffer-oriented operations in a new decade of C++| vector-of-bool.github.io
In which I remake an old library in a new era| vector-of-bool.github.io