Deduce first template parameter in multiple parameter template by parameter
问题 First my question and then an explanation of what I'm trying to do as I might be approaching the problem wrong. Is it possible to deduce the first template parameter in a multi parameter template from parameters while specifying the other parameters. Example: template<class A, class B> B function(A object) { return B(A); } called like: function<BType>(AInstance); I could not find a way to make this work. EDIT: Another example might fit better to my problem below as indicated to me by the