News for hackers. Stuff that matters.
Re:Auto Type Deduction in C++ Range-Based For Loops by lorenzhs on Friday September 02, 2016 @11:32AM (#12413706)
Yes in this case it's a universal reference, I'm aware. Universal references work with auto&&. What std::forward does is the following:

- if you put in an rvalue reference, it's like std::move

- if you put in anything else, it does nothing.

So my point about the article's formulation ("when you want to modify elements in the range in generic code") and its example remains.

There are no comments on this comment yet.