Hacker News new | ask | show | jobs
by detrino 3987 days ago
There was a proposal[1][2] for C++17 to allow:

    for (e : c)
which would be equivalent to:

    for (auto &&e : c)
Gcc implements this when compiling with -std=c++1z. My understanding is that it was rejected by the committee.

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n385...

[2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n399...