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
2
u/Ateist Apr 25 '26 edited Apr 25 '26
You do know that this is a simplified example, right?
In real life the function would have had more items returned or there would be other reasons for using this feature - things like templates, preprocessing directives, dynamically derived types, procedurally generated code, etc.
Or just having been written by a novice programmer (or AI code assistant) that doesn't know good from bad.