
18 May
2013
18 May
'13
8:48 p.m.
Is it possible to sort the container by value? In below example by "member
" Or also other keys like: Sort by "member "
Quoting from the documentation: "Composite keys are sorted by
lexicographical order, i.e. sorting is performed by the first key,
then the second key if the first one is equal, etc. This order allows
for partial searches where only the first keys are specified".
http://www.boost.org/doc/libs/1_53_0/libs/multi_index/doc/tutorial/key_extra...
If you need to sort by any arbitrary parameter, make an ordered index
based on it.
In your example the second index is sorted by
member