Hacker News new | ask | show | jobs
by steveklabnik 414 days ago
"C++ code that implements the problem, but in a different way" is not "the actual C++ translation of the opening code in TFA."
1 comments

The C++ code implements the intended goal, not the problem TFA is trying to illustrate.

Changing between:

    for (auto i : vec)
and

    for (auto & i : vec)
has essentially no bearing on what the author is trying to show. If they were focused on how move semantics are always important, they would not use an integer type.