Untitled
public cpp v1 · immutableclass Foo { void set_str(const string& str); void set_str(const char* str);};class Bar { template <typename ClassType, typename ValueType> 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);