Jaakko Jarvi wrote:
std::for_each(M.begin(), M.end(), std::cout << l::bind(select2nd(), l::_1) << " ");
Well, that's too complicated ;-)
_binding_ to a function or functor is the approach
I wanted to avoid.
I think that select1st and select2nd (or - to be generic - select<n>)
could be directly supported by boost::lambda.
It's so common to have a list/vector of tuples or a std::map
(yes, its a request for a feature ;-))
I tried to write something taking ll_static_cast as an example,
but failed to quickly understand the requirements
and semantics of lambda_functor*
Could You correct/complete the code below?
I could not figure out how select2nd_action::apply
gets its RET defined :-(
Is there some documentation on the functor conventions
or on how to extend LL?
class select2nd_action
{
public:
template
ll_select2nd(const Arg1& a1) {
return
lambda_functor_base<
action<1, select2nd_action >,
tuple