I am slightly confused by these lines:
template<typename typename="" p1="">
As far as I am aware this is not valid C++, it could be part of new C++0x stuff as I haven't had time to review that in detail yet. But anyway you shouldn't require to use any new features to solve this problem so I will proceed anyway.
So firstly, to specify all the template arguments we need one typename for each and make them into a comma separated list. Notice the capitalisation on the P1 as the case must match your function prototype.
template<typename R, typename T, typename P1>
Ok scratch that as I just noticed it seems that is a problem with the site.
Next lets look at that vector definition:
std::vector<pfunc> MyFuncts;
The reason it won't work is because as you say pfunc is a local variable, it is the argument passed to our function and template arguments must be types. It is simple to construct a type that matches the type of pfunc however using a our template arguments and a typedef. Which put together with the correct template specification gives us the following code:
template<typename R, typename T, typename P1>
void DeduceMFB( R(T::*pFunc)(P1) )
{
R MyR;
P1 MyParam1;
T MyTarget;
typedef R (T::*pNowATypeFunc)(P1);
std::vector<pNowATypeFunc> MyFuncts;
MyR = (MyTarget.*pFunc)(MyParam1);
return;
};
Now as I don't quite follow the template notation you have used I don't see much difference between the 3 DeduceMF functions well except for DeduceMFB including a vector, so I hope I didn't miss anything, but this function should work happily in all three cases. Hope that helps.