Boost logo

Boost Users :

Subject: Re: [Boost-users] question on multi_index_container
From: Igor R (boost.lists_at_[hidden])
Date: 2012-10-31 13:16:44


> I created a multi_index_container in a way to emulate and enhance a
> std::set. That is, ordered_unique on some key extraction I specified.
> Like a std::set, inserting a "duplicate" will not do the assignment at all
> and the old value remains. However, what I want is for the new item to
> replace the old with the same key.
>
> Is there an easy or straightforward way to configure multi_index_container
> to do this?

No, you'll have call replace() explicitly.


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