All pastes #296871 Raw Edit

phoemix

public cpp v1 · immutable
#296871 ·published 2006-12-30 17:27 UTC
rendered paste body
  class realoptionftor {  public:    virtual void call(std::string &_opt, std::string &_value)=0;  };  template<typename T> class optionftor: public realoptionftor {  private:    typedef void (T::*func_t)(std::string &_opt, std::string &_value);    T *obj;    func_t func;  private:    optionftor();    optionftor(const optionftor &);  public:    void call(std::string &_opt, std::string &_value) {      (obj->*func)(_opt, _value);    };  };