I have some difficulties understanding how Boost.MultiIndex is implemented. Lets say I have the following:
typedef multi_index_container<
employee,
indexed_by<
ordered_unique<member<employee, std::string, &employee::name> >,
ordered_unique<member<employee, int, &employee::age> >
>
> employee_set;
I imagine that I have one array, Employee[]
, which actually stores the employee
objects, and two maps
map<std::string, employee*>
map<int, employee*>
with name and age as keys. Each map has employee*
value which points to the stored object in the array. Is this ok?