In C++20 the auto
keyword can be used for function input parameters. Is this a proper replacement for function templates and are there any practical differences to consider when deciding on which approach to take?
template <typename T>
void myFunction(T& arg)
{
// ...
}
vs.
void myFunction(auto& arg)
{
// ...
}