Hello Joaquin,
I am trying to erase a record in the container based on keys - in my
case both the keys are ordered
and unique and I need to have ways to delete records based on either
of the keys.
I tried to erase an element based on key2 & I got the following error:
"error: no matching function for call to 'boost::multi_index
....<Error runs for more than a page>
:erase(boost::multi_index::detail::index_iterator
tMapDef;
class MyWrap {
private:
MyMap MyContainer;
..
public:
insert(UINT32, UINT32, A *);
erasebykey2(unsigned long);
};
bool MyWrap::erasebykey2(unsigned long param_key2) {
bool ret = FALSE;
typedef tMapDef::index<key2>::type tKey2Type;
tKey2Type& key2_index = MyContainer.get<key2>();
tMapDef::index_iterator<key2>::type it =
key2_index.find(param_key2);
if (it == key2_index.end()) {
cout << "No matching Recs with key2" <