Boost logo

Boost :

Subject: Re: [boost] [Fit] formal review starts today
From: Peter Dimov (lists_at_[hidden])
Date: 2016-03-05 05:19:57


Steven Watanabe wrote:
> On 03/03/2016 07:16 PM, paul Fultz wrote:
> >> placeholders.hpp:
> >>
> >> We really don't need another lambda library, let alone
> >> a half-baked one.
> >
> > Its not designed to be a full lambda library. Just enough to handle some
> > constexpr cases.
> >
>
> Exactly my point.

I actually like this another lambda library, and I'm not sure why it's
half-baked.

The reason I like it is that when I proposed std::bind I deliberately put
into it the hooks (is_placeholder, is_bind_expression) that allow a simple
lambda library to be written to extend it, so that one can write f.ex.
bind( f, _1 ) + bind( f, _2 ) * 2. And with C++11, writing this extension is
almost trivial. I've been trying to find the time to do so, and write an
article about it, but no luck so far. Well, Paul wrote one.

We've also been struggling with the theoretically sound way to define _1 in
a header, and Paul provides a solution for that as well.

(The one suggestion I have regarding this portion of the library is that
Fit's placeholders should specialize boost::is_placeholder so that they
could be used with boost::bind.)


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