Boost logo

Boost Users :

Subject: Re: [Boost-users] boost multi-index container find method.
From: Igor R (boost.lists_at_[hidden])
Date: 2009-09-17 15:18:46


> Idx : 200 flag : 5
>
> While find functionally is correct in picking up the correct data, but
> I am wondering why it doesnt pick the first record (100) which has the
> flag value set to 5? am I missing something in the indexing definition
> in the container itself?

You have 2 separate, unrelated indices, so (100, 5) should be the 1st
entry on the 2nd index? It doesn't sort by "idx" field. Probably you
want to make the second index "composite" (flag, idx) - then you'll
get the desired functionality.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net