Adding another offer to the bank, and in the same spirit as Vittorio's answer, you can add another template parameter to the signature:
template <class UserType, class InputType> void foo(InputType x){...}
Then, to use it, you must specify the first parameter of the template, since it cannot be output. This has a slight advantage in distinguishing between what the user wanted and what was transferred, which may be useful in some cases.
source share