struct S
{
template <auto> void F(){};
};
S s;
void (S::* pmf)()=s.F<true>;
compiles error, how to fix it? Thanks for your help.
struct S
{
template <auto> void F(){};
};
S s;
void (S::* pmf)()=s.F<true>;
compiles error, how to fix it? Thanks for your help.
You should use the class name to qualify the member function, and there's no implicit conversion from member function to member function pointer, so use operator& explicitly. e.g.
void (S::* pmf)() = &S::F<true>;