Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-03-31 18:00:59


Andrzej Krzemienski wrote:
> Maybe Boost.Lambda2 could also provide its own thin wrapper for std::bind
> which returns a type from namespace boost::lambda2

I think (and hope) that this won't be necessary.

By the way, one advantage of Lambda2 defining its own placeholders would
be that they will now be usable as function objects. The need for just _1 or
_2 as a lambda is surprisingly common and it's an annoyance that they don't
work.

I was going to add a "wrong" unary plus allowing +_1 to be usable as identity
instead of _1, but now this hack won't be needed.

> Anyway, at some point you may need to add something like
> `boost::lambda::constant` to handle cases like `"TIME " + time + _1`.

Yes, maybe. That's bind(identity(), x), and your point is probably that
boost::lambda2 is not going to be an associated namespace of it.

We'll see.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk