Date: 2001-06-13 10:50:52
Douglas Gregor <gregod_at_[hidden]> writes:
| > OR... all such object need to f.ex. be repackaged into function<void>
| > before being passed to the queue. (it that even allowed?)
| Perhaps some examples would help. Here's some of what Boost.Function can do:
Ok, I do not have any problems with this.
Note that I wanted to use "defer_call" to bind _all_ arguments.
so in essence what I wanted is:
function<void> f(bind_all(&foo, arg1, arg2, ... , arglast));
Perhaps _this_ would be something for boost then... (the lambda lib
can be used of course, but it is a tidbit more complex...)
| For your example with the queue of threads to start, you would have
| to decide
| on a common return type for the boost::function objects (most likely
Supposed to be an examble with a worker thread that gets fed functions
to run, but the result is the same.
| The return type of the actual functions that are being called as threads
| won't be relevant, then, because the result will be eaten by
I was not (completely) aware of this.
| This is no less powerful than your defer_call example: the return types must
| all be normalized to one type anyway because of static type checking.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk