C++ Language/Variables/DecomposingAuto
The statement auto[iDesti,fDesti] = oSource;
simultaneously defines two variables (iDesti
and fDesti
), initializing each of them to some corresponding value from the right-hand-side.
The right-hand-side could be a std::tuple<int,float>
or it could be an object (whose first data member is a int
, and second data member is a float
).
Additional information about decomposing-auto (includes interactive examples)