r/cpp • u/pavel_v • Apr 24 '26
C++26: Structured Bindings can introduce a Pack
https://www.sandordargo.com/blog/2026/04/22/cpp26-structured-bindings-packs
101
Upvotes
r/cpp • u/pavel_v • Apr 24 '26
View all comments
Show parent comment
16
u/tuxwonder Apr 24 '26
I don't see how this is a problem. If you're writing a structured binding like this, it's because you want 1. The first tuple item, 2. The last tuple item, and 3. A pack of whatever is in-between. If you expected exactly 3 tuple items of exactly the types X, Y, Z, why did you write it this way?