class Foo { void set_str(const string& str); void set_str(const char* str); }; class Bar { template void templateMethod(ClassType::*method(ValueType) { // Do something with the method pointer. } } ... Bar b; // Should pass pointer to set_str(const string&), but how to specify that constraint? b.templateMethod(&Foo::set_str);