Boost logo

Boost Users :

Subject: Re: [Boost-users] A[MultiIndex] Erasing boost MultiIndex entry
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-08 14:12:33


AMDG

ishay lavi wrote:
> const typeItemsIndexingContainer::index<ItemIndex::ItemName>::type&
> indexItemName = my_indexing.get<ItemIndex::ItemName>();
> typeItemsIndexingContainer::index<ItemIndex::ItemName>::type::iterator
> itName = indexItemName.find( item1.chItemName );
> indexItemName.erase( itName );
>
> const typeItemsIndexingContainer::index<ItemIndex::ItemGroup>::type&
> indexItemGroup = my_indexing.get<ItemIndex::ItemGroup>();
> typeItemsIndexingContainer::index<ItemIndex::ItemGroup>::type::iterator
> itGroup = indexItemGroup.find( item1.chItemGroup );
> indexItemGroup.erase( itGroup );
> //========================================================================

You can't erase from a const index.

In Christ,
Steven Watanabe


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