r/cpp • • Apr 24 '26

C++26: Structured Bindings can introduce a Pack

https://www.sandordargo.com/blog/2026/04/22/cpp26-structured-bindings-packs
99 Upvotes

40 comments sorted by

View all comments

Show parent comment

1

u/zerhud Apr 24 '26

You are talking about you want very fragile code: minor change will break down your compilation and force you to rewrite code. It’s good for making money in big companies and bad for tasks in reality.

2

u/Ateist Apr 25 '26

Changing the number of return arguments is not a minor change and absolutely should force you to break down your compilation and force you to rewrite code.
The fact that it doesn't is the problem here.

It’s good for making money in big companies and bad for tasks in reality.

No, it's godawful for everyone.
You don't want programs to silenty keep working with the wrong structurally binded variables.