Steven Watanabe | 3 Jul 22:50
Picon

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

AMDG

Vjekoslav Brajkovic wrote:
> This issue is when I modify the code such that
>
>     connection_.socket().async_connect(endpoint,
>             boost::bind(
>                     &com_client::handle_connect,
>                     this,
>                     //2,
>                     boost::asio::placeholders::error,
>                     ++endpoint_iterator)
>     );
> <snip>
>
> enum command_t {
>     DEPOSIT_CHUNK = 2,
>     DETRIEVE_CHUNK = 4,
>     HEARTBEAT = 16
> };
>
> I was hoping if somebody could explain this. I've attached g++ output.

You can't convert from int to command_t implicitly.
Does it work if you pass DEPOSIT_CHUNK instead
of 2?

In Christ,
Steven Watanabe

Gmane