Boost logo

Boost Users :

Subject: Re: [Boost-users] Turning Boost.Multi-Index ordered_non_unique index into ordered_unique one, with custom comparator
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2016-03-03 08:34:56


On Thu, Mar 3, 2016 at 2:12 PM, Dominique Devienne <ddevienne_at_[hidden]>
wrote:

> On Thu, Mar 3, 2016 at 2:06 PM, Joaquin M LópezMuñoz <joaquin_at_[hidden]>
> wrote:
>
>> Dominique Devienne <ddevienne <at> gmail.com> writes:
>
> [...] Thanks to the overloads of entry_occurrence_less::operator()
>>
> we can lookup by occurrence as if we were using
>> member<entry,int,&entry::occurence>:
>>
>
> This is the part I was missing, and struggling with.
>

Note that this CompatibleKey feature of BMI is just super handy, BTW.

I've used it before, and even wrote a custom comparator with overloads,
which means I should have seen your excellent solution myself.

Really the "only" thing missing from this container are "runtime"
(non-unique) indexes :). --DD



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