Steven Watanabe | 4 Jul 00:08
Picon

Re: [Boost.Bind] Adding a single argument to an existing function, breaks the code.

AMDG

Vjekoslav Brajkovic wrote:
> On Thu, 3 Jul 2008, Steven Watanabe wrote:
>> You can't convert from int to command_t implicitly.
>> Does it work if you pass DEPOSIT_CHUNK instead
>> of 2?
>
> Unfortunately not. Initially I was passing <command_t command> from
> handle_init(), but then I decided to put value 2, so that I can isolate
> the issue.

Does it work if you use mem_fn?

            boost::bind(
                    boost::mem_fn(&com_client::handle_connect),
                    this,
                    2,
                    boost::asio::placeholders::error,
                    ++endpoint_iterator)

How about an explicit return type?

            boost::bind<void>(
                    &com_client::handle_connect,
                    this,
                    2,
                    boost::asio::placeholders::error,
                    ++endpoint_iterator)

In Christ,
Steven Watanabe

Gmane