1 Feb
2004
1 Feb
'04
8:29 p.m.
Cheenu Srinivasan wrote:
Instead I'd like to postpone the call to the returned object. What's the type of obj?
main() { int i = 99; WHAT_IS_MY_TYPE obj = bind(f, _1, 1.234); ... cout << obj(i) << endl; }
You can use a separate function template: template<class F> void test(F f) { int i = 99; std::cout << f(i) << std::endl; } int main() { test( boost::bind(f, _1, 1.234) ); }