Boost logo

Boost Users :

From: fungos (fungos_at_[hidden])
Date: 2006-12-08 11:40:57


Ok, so If I want to use a multi_index to manage a large collection of
dynamic data, I need to be constantly updating it using the container update
functions. So I need find a way to my objects known their containers so I
can manage that Update inside the setters of my object. This will work? (I
will try as I get at home again)

On 12/8/06, Jeff F <TriumphSprint2000_at_[hidden]> wrote:
>
> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Animal Frontline Liberation


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