Adding list as well:

On Thu, 2016-03-24 at 13:59 -0400, Alan Conway wrote:
> ...
> Disagree. Example:
> 
> connection c = ...;
> sender s = c.open_sender(...);
> message m = ...;
> 
> c.inject([s, m]() { s.send(m); }); // Capture
> c.inject(std::bind(sender::send, s, m)); // Bind

Except this isn't using my proposed API!

that would be:

sender s = ...
message m = ...

s.inject([m](s) { s.send(m); }); // A little different,
// But no useless argument
s.inject(std::bind(sender::send, _1, m)); // Very slightly different:
// and perhaps a little harder to understand at first.

At least that is how I'd expect my proposal to work.

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to