Hacker News new | ask | show | jobs
by amelius 2209 days ago
Yes, the code

    auto [quotient, remainder] = divide(14, 3);
is not an assignment. In an assignment, you should write something like

    std::tie(quotient, remainder) = divide(14, 3);
which is a tuple assignment written as a single assignment.

This shows the kind of (imho) "ugly hacks" the C++ committee had to make to cover up the historical mistake with the comma operator.