Hi Nat.
Thanks. That works nicely!
Thanks.
Nick.
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Nat Linden
Sent: 05 November 2010 16:15
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Asio and bind. Queuing a bind call.
On Fri, Nov 5, 2010 at 7:08 AM,
wrote:
As the result of boost::bind is a template I don't know of an
stl or boost container which will store these objects.
As there are a number of functions that can be called on my
resource with differing arguments I don't think I can use a
boost::function as I don't know the arguments to my generic post call.
I think boost::function may be exactly what you want. The usage
would be to boost::bind() your function with all the desired argument
values: I'm assuming you already know these before you decide whether
the resource is ready to service the function call. Then you can simply
call the resulting object with no additional arguments. Everything it
needs is already bound.
Then it's easy to decide whether to call it immediately, or put it in a
std::queue< boost::function >.