Observations:
Decomposition declarations. [..] Was originally called "structured bindings".
[..] C++17 decomposition declarations (the feature formerly known as "structured bindings").
Questions:
The new correct name will be a "structured binding declaration", based on wording in P0615. Basically, in:
auto [x,y] = Point(4,2);
The full statement is known as a "structured binding declaration", while the identifiers x
and y
are known as "structured bindings". These will be the official terms in C++17. Indeed, the latest draft section is now titled Structured Binding Declarations.
The issue is that there are two concepts, that need two different names - so the original wording paper used decomposition declaration for the declaration statement (the term "structured binding" did not appear in the wording at all). However, for most users, this is silly because there's only one concept - the structured binding - so having two different names is harder to learn. Particularly confusing if compiler error messages used "decomposition declaration" in their messages. Regardless of the use of the term "decomposition declaration," the name of the feature has always been structured bindings.
In Kona, EWG decided to stick with the two names, but at least have them sound closely related.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With