|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-02-01 15:29:36
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) );
}
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net