So I came across with this today about C++ template programming, can anyone explain to me what A(*)(B) as a template argument?
template <class X, class Y, class A, class B>
struct replace_type_impl<A(*)(B),X,Y,false>
{
typedef typename replace_type<A,X,Y>::type (*type)(typename replace_type<B,X,Y>::type);
};
The type
A (*)(B)is the type of a pointer to a function taking one argument of typeBand returning a value of typeA.It’s just another type. Your code is an instance of partial specialization of the class template
replace_type_impl.