
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:
http://boost.cvs.sourceforge.net/boost/boost/boost/lambda/detail/lambda_functors.hpp?r1=1.7&r2=1.8
:-)
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@mail.ru