I have a Boost multi-index container for storing MyClass
members. It has a unique (first_field) and non-unique (second field) indices:
typedef multi_index_container<
MyClass,
indexed_by<
ordered_unique<member<MyClass, std::string, MyClass.first_field>>,
ordered_non_unique<member<MyClass &, std::string, MyClass.second_field>>>
> MyClass_Set;
If I search the container by the second index:
auto it = container.get<1>().find("second_field_value_to_be_searched);
I get a const iterator back. How do I iterate over ALL elements in the container that matches the above predicate?