Hacker News new | ask | show | jobs
by alecco 652 days ago
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.
1 comments

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.