>>759
template<class T> T foo(const T& t){return t;}
template<class T, class U> U foo(const T& t){return U();}

foo(10);
foo<int>(20);
foo<int,int>(30);