Often people std::forwardcall the object before calling it ( example ):
template <typename F, typename ...Args>
void call(F &&f, Args &&...args)
{
std::forward<F>(f) (
std::forward<Args>(args)...
);
}
What is the advantage of std::forward-ing fin the above example over a simple one f(std::forward<Args>(args)...?
source
share