In C++20, is the following function not ill-formed:
void f(auto&&... args) { /*...*/ }
and, if not ill-formed, is there a way to forward arguments in the body (without modifying the signature) in exactly the same fashion as the following function:
template<typename... Args>
void f(Args&&... args) {
g(std::forward<Args>(args)...);
}
If so, what should replace the use of Args
as the template argument to std::forward
?