r/cpp • • Apr 16 '26

C++26: Structured bindings in conditions

https://www.sandordargo.com/blog/2026/04/15/cpp26-structured-bindings-condition
60 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/biowpn Apr 17 '26

With the new syntax, isn't it still the LHS that is tested (LHS being the hidden variable whose fields the identifiers bind to)?

1

u/jedwardsol const & Apr 17 '26

I suppose it's a hidden LHS of something. But it's the RHS of the code people actually read - which I believe is new and what caused me to comment in the first place.