
9 Apr
2007
9 Apr
'07
6:22 p.m.
Andrey Semashev wrote:
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.
No, this won't work, unfortunately. Lambda doesn't work with Bind's placeholders. I don't know how difficult it'd be to make it support is_placeholder.