How do I make the method name (here some_method) a template parameter?
template<typename T>
void sv_set_helper(T& d, bpn::array const& v) {
to_sv(v, d.some_method());
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no such thing as a ‘template identifier parameter’, so you can’t pass names as parameters. You could however take a member function pointer as argument:
that’s assuming the function has a
voidreturn type. And you will call it like this: