Re:What's new in C++26 (part 1)
by alecco on Saturday September 07, 2024 @04:45AM
(#41472516)
What is assigned (std::to_chars_result) is considered by the if condition. The left hand side of the assignment is then split in two. Just like if it were if (auto res = std::to_chars(p, last, 42)). The split with the [to, ec] makes it convenient inside the if body.
[ Parent
| on HN ]
Re:What's new in C++26 (part 1)
by quietbritishjim on Saturday September 07, 2024 @07:41AM
(#41473318)
Ok but you've avoided saying whether my example would work, and I don't think what you've said even hints one way or another.