質問です。

template<class T, class U> U func(T x);

のような関数を作りたいのですが、このままでは

Foo x;
Bar y = func<Foo, Bar>(x);

のような書き方をしなければなりません。
templateパラメータUを引数から推測させ

Foo x;
Bar y = func<Bar>(x);

とするためにはどう記述すれば良いのでしょうか。