$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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) );
}