Do const references in structured bindings extend the lifetime of the decomposed object?
Yes. The trick is to realize that despite the appearance, the portion of a structured binding declaration before the [ doesn’t apply to the names in the identifier-list. They apply instead to the variable introduced implicitly by the declaration. [dcl.struct.bind]/1: First, a variable with a unique name e is introduced. If the assignment-expression in the … Read more