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 type B
and returning a value of type A
.
It's just another type. Your code is an instance of partial specialization of the class template replace_type_impl
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With