|
Boost Users : |
Subject: Re: [Boost-users] [bind] Possible to use variadic templates with bind?
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2010-07-22 05:29:29
Ok, I've figured out the answer to question 2:
void call(Args... args)
{
boost::function< void() > bound_fn = boost::bind(f, args...);
bound_fn(); // in effect the bound_fn will be stored in a queue for
later envocation by a different thread
}
Interested in your comments on my other 2 questions?
Thanks again
Steve
[snip]
>
1. Please can you give an explanation of what the compiler is actually doing
> in your make_func_helper() and make_indexes_...() - This goes beyond my
> capabilities at the moment, and I'm always looking to improve my knowledge.
>
> 3. In attached file "attempt_2.cpp" at Line 27, there's a struct cb_ with a
> typedef "type" of the member function pointer of the form T::fn(Args...).
>
> template< class T, class... Args >
> struct cb_ { typedef void (T::*type)(Args...); };
>
> As far as I can see, this is of the same form as Peter's void
> (T::*pm)(Args...) member function pointer is it not? How come the compiler
> can't match &X::f with typename cb_<T, Args...>::type?
> [/snip]
>
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