
19 Jan
2005
19 Jan
'05
8:12 p.m.
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
7451
Age (days ago)
7451
Last active (days ago)
0 comments
1 participants
participants (1)
-
Brock Peabody