I am having below composite container. I am looking to sort the container by member
duplicateBook;
Regards, UJ
Uthpal Urubail
I am having below composite container. I am looking to sort the container by member
at the end. Can some one help me to achieve this?
Hi Uthpal,
Please use [multi_index] (or whatever the lib your post is about)
in your subject line, as suggested in
http://www.boost.org/community/policy.html
Thank you!
As for your question, to have the elements in your duplicateBook
sorted by card, you have sceral options:
1. Add an additional index based on card:
ordered_non_unique
On 1/20/2014 4:58 AM, Uthpal Urubail wrote:
I am having below composite container. I am looking to sort the container by member
at the end. Can some one help me to achieve this?
If you are just using your existing index for looking up matching values, and don't care that they are sorted by CA::name, then you can just change the order of your subkeys and put CA::card first.
typedef multi_index_container< CA, indexed_by< ordered_unique< composite_key< CA, member
, member , member > > duplicateBook;
participants (3)
-
Joaquin M Lopez Munoz
-
John M. Dlugosz
-
Uthpal Urubail