All pastes #929012 Raw Edit

Untitled

public cpp v1 · immutable
·published 2008-03-05 13:57 UTC
rendered paste body
class 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);