Personally, I would find the use of parentheses quirky here, but square brackets don't work because [[ and ]] are meant to be for attributes always.Maybe if you had some really good motivating examples that show where you need nested structured bindings frequently, I could be convinced, but otherwise from me, it's a bigeh, not worth the trouble, and we can't have nice syntax for itThe example that you have provided seems to use an artificially long name for the bindings rather than e.g. [key, val] in order to make the savings seem more significant. Do you have some real-world examples?On Mon, 21 Sept 2026 at 14:15, HHN via Std-Proposals <std-proposals@lists.isocpp.org> wrote:--Currently structured bindings do not allow for nested bindings.std::map<Identifier, std::pair<Handle, Context>> map;// to get a copy of identifier, handle and infofor (const auto &[identifierRef, handleWithContextRef] : map){auto identifier = identifierRef;auto [handle, context] = handleWithContextRef;}// Suggested replacementfor(auto [identifier, (handle, context)]: map){}All sb-identifiers in the structured-binding-declaration will have the same reference qualifier.Updated in the C++ grammarsb-identifier :...opt identifier attribute-specifier-seqopt( sb-identifier-list ) // new production rulesb-identifier-list :sb-identifiersb-identifier-list , sb-identifierstructured-binding-declaration :attribute-specifier-seqopt decl-specifier-seq ref-qualifieropt [ sb-identifier-list ]I have attached an argument that this won't cause any parsing ambiguities--Hari Hara Naveen
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals