
31 Oct
2012
31 Oct
'12
5:16 p.m.
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.