
11 May
2010
11 May
'10
8:10 a.m.
AMDG alfC wrote:
since I have access to f I would like to make f smart enough to handle its own binding. Eg.
class f{ ... // same as before function<double(double)> operator()(double x_value, YYYY y_arg){ return bind( &f::operator(), //maybe needs cast to double(*) (double,double) *this, x_value, y_arg ); } function<double(double)> operator()(XXXX x_arg, double y_value){ return bind( &f::operator(), //maybe needs cast *this, x_arg, y_value ); } };
The question is: What should be the type of XXXX and YYYY?
You'll have to make operator() a template: template<class T> function<double(double)> operator()(const T& x_arg, double y_arg); In Christ, Steven Watanabe