Why should this not work? This instance corresponds to a specialization that retrieves component types ( char and int ) of a composite type ( char(int) function) like Type1 and Type2 .
By the way, you do not have a non-type template parameter. Type of function - type. If you have a non-type template parameter, it will look like this:
template <char(int)> struct X {}; char foobar(int); int main() { X<foobar> x; }
Or completely the template:
template <class R, class A, R(A)> // ^^^^ // non-type parameter struct X {}; char foobar(int); int main() { X<char, int, foobar> x;
Unclebens
source share