Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-10-29 20:37:03

I have a request for Peter Dimov. Before I go any further, just let me say
that I only recently began using Bind -- I love it!

My request: Can you provide a type generator for bind? Something on the
order of:
  boost::bind_traits<F, R, A0 = void, A1 = void, A2 = void, ...>
  { typedef ... result_type; };
or anything similar that can provide some typedef for the result of a bind

I'd much appreciate it. BTW, this would apply to mem_fn as well.


P.S. The Reason: Having recently converted to Function/Bind from Borland
closures, I was trying to reduce the number of "_" parameters passed to
  t.OnTimer = bind(&X::func, &x); // equivalent to:
  t.OnTimer = bind(&X::func, &x, _1, _2, _3);

(with Borland closures the above would be "t.OnTimer = x.func;", a much
cleaner syntax)

I should be able to just add more overloads to "bind" to allow missing
arguments to default to _1, _2, _3, ..., but I need to know the result type
in order to do so.

This would also help anyone who intends to build another library on top of

Boost list run by bdawes at, gregod at, cpdaniel at, john at