3 ms·
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 rval
by lorenzhs 10y ago
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.