|
Boost Users : |
Subject: Re: [Boost-users] multi index container
From: joaquin_at_[hidden]
Date: 2010-02-03 10:54:06
Dejan escribió:
>> typedef mi::multi_index_container<
>> employee *,
>> mi::indexed_by<
>> mi::ordered_unique<mi::member<employee, int, &employee::id> >
>> >
>>
>>> employee_set;
>>>
>
> Maybe i should mention that I search for something like this:
>
> employee_set.find(employee* pointer);
>
> and
>
> employee_set.find(int id)
Now that I think again about it, when you write:
employee* p=...
employee_set.find(p);
Can't you just write this
employee* p=...
employee_set.find(p->id);
and be done with only one lookup criterion?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
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