Just call it like
auto x = ...
f(x)
templated functions automatically deduce the type depending on the arguments you pass it. In fact that's the preferred way to call a templated function.
If you really want to explicitly give it the type (I don't recommend doing that) you can use decltype for it:
auto x = ...
f<decltype(x)>(x)
Here a minimal proof: http://coliru.stacked-crooked.com/a/d01070d90c0b9803