Boost logo

Boost Users :

From: Jeff F (TriumphSprint2000_at_[hidden])
Date: 2006-12-08 09:02:04


fungos wrote:
>> Nice! const_mem_fun worked in this sample. I will try to port my map
>> to multi_index now and see how it performs.
>> But, I dont want to give up without understund why mem_fun doesnt
>> work. Anybody has any theory? :D

IIRC, you are only allowed access to the const interface of items held by
multi_index containers. Non-const methods by definition mutate the object
upon which they act, which could change the item's state upon which the sort
order is based. That is why you must use multi_index's update functions to
modify the state of any of it's items.

Jeff Flinn


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