For almost 7 months of studying C++, I've been curious about when to explicitly specify template arguments, specifically function templates.
std::forward is one such example, that should be provided with type template argument (std::forward<Type>(arg)).
Usually, the template arguments are deduced through function parameter types, like:
template <typename T>
void lets_try(T x);
...
lets_try(5) // lets_try<int>(5);
Or, to avoid being deduced, I usually use std::type_identity_t:
template <typename T>
void lets_try(std::type_identity_t<T> x);
...
lets_try(5) // error
lets_try<int>(5) // ok
That's the only thing I've got.
Again, my question is, when should template arguments be specified explicitly? What are the benefits of explicitly specifying them?