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
1
u/AvidCoco Apr 25 '26
You could argue the same for std::get that using the index-based version breaks type safety and you should only ever use the type-based version.
In some cases you want something by index.