How would one call std::forward on all arguments in a variadic function?

You would do:

template <typename ...Params>
void f(Params&&... params)
{
    y(std::forward<Params>(params)...);
}

The ... pretty much says “take what’s on the left, and for each template parameter, unpack it accordingly.”

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)