Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-09-13 15:30:00


Arkadiy Vertleyb wrote:
> "Peter Dimov" <pdimov_at_[hidden]> wrote
>
>> In 1.33, you can't use boost::bind with Lambda's placeholders.
>> Either use Bind's ::_1 placeholder, or use boost::lambda::bind.
>>
>> In 1.35, the code will work even with Lambda's placeholder.
>
> Is 1.35 correct or did you mean 1.34?

1.35 is correct. 1.34 has been closed for new features for quite a while.

> Just an idea -- is it possible to have one universal set of
> placeholders in boost? Bind, Lambda, MPL, and possibly other
> libraries could then use some sort of redirection to their
> specialized placeholders... Might help to avoid some confusion.

This isn't possible in general, but in 1.35 boost::bind implements the TR1
is_placeholder extension mechanism that allows anybody to define their own
placeholders. I've already made Lambda's placeholders compatible with
boost::bind. Bind's placeholders can't be made compatible with Lambda, since
the latter places more requirements on its placeholders; they are
fully-featured lambda expressions.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net