|
Boost : |
From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2005-01-19 15:12:45
Hi,
Is there a way to write lambda expressions in the form of:
lamba_expression_x < lambda_expression_x
without repeating "lambda_expression_x"? I tried this but it didn't work:
(
bind(_1, protect(_1))
< bind(_1, protect(_2))
)
(lambda_expression_x)
I was trying to sort a vector of objects by a data member:
std::sort(
v.begin(),
b.end(),
(&ll::_1 ->* &s::i) < (&ll::_2 ->* &s::i)
);
Thanks,
Brock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk