Re:What's new in C++26 (part 1)
by protomolecule on Saturday September 07, 2024 @09:56AM
(#41473968)
Your example wouldn't work, yes.
In case of structured binding
The decision variable of the declaration is the invented variable e introduced by the declaration.
but in your case its simply: The decision variable of the declaration is the declared variable.
Yes exactly, my example would work?
> My hunch is to remember that in `auto [to, ec] = std::to_chars(p, last, 42)` the two names `to` and `ec` are not "real" variables/objects, but ...
Oh so my example wouldn't work after all (because std::string s is a "real" variable/object)?