Can the auto
keyword in C++11 replace function templates and specializations? If yes, what are the advantages of using template functions and specializations over simply typing a function parameter as auto
?
template <typename T>
void myFunction(T &arg)
{
// ~
}
vs.
void myFunction(auto &arg)
{
// ~
}