Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-04-09 13:25:15

Hello Peter,

Monday, April 9, 2007, 8:17:14 PM, you wrote:

> Peter Dimov wrote:
>> Andrey Semashev wrote:
>>> Hello,
>>> I'd like to ask if it is possible to make Boost.Lambda place holders
>>> _1, _2 and _3 compatible with Boost.Bind?
>> The latest version of Bind supports arbitrary placeholders via the
>> TR1-compatible is_placeholder<> trait/metafunction. See
>> libs/bind/test/bind_placeholder_test.cpp for an example.

> I was going to add that now we just have to specialize is_placeholder for
> Lambda's placeholders, but closer investigation on my part revealed that
> someone going by the nickname of 'pdimov' already did that 9 months ago:


> :-)

Nice. :)

But will it work with lambda? I.e. will this work:

using namespace std;
using namespace boost;

for_each(v.begin(), v.end(), lambda::var(cout) << _1);

Note the placeholder is not lambda::_1.

Best regards,
 Andrey                            mailto:andysem_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at