a and b name pieces of
__e_today, and both are new names.
Declaration Example
Given
Point arr[2];auto&[x, y]= arr;
Expands to
Point (&__e_today)[2]= arr;// __e_today references arrPoint& x = __e_today[0];// x is declared as a reference to __e_today[0]Point& y = __e_today[1];// y is declared as a reference to __e_today[1]
Assign, don’t declare
using marks an element that names an existing variable —
it is assigned, not declared.
Given
int id;auto[using id, name]= get_record();// id is assigned, name is declared
Assignment Example
Given
Point arr[2];Point x;auto&[using x, y]= arr;
Expands to
Point (&__e_p3817)[2]= arr;// __e_p3817 references arr, no changex = __e_p3817[0];// x is assigned from __e_p3817[0]Point& y = __e_p3817[1];// y is declared as a reference to __e_p3817[1]