Boost logo

Boost Users :

Subject: Re: [Boost-users] Please help me to choose a container
From: Jayden Shui (jayden.shui_at_[hidden])
Date: 2011-12-20 19:13:21


On Tue, Dec 20, 2011 at 7:07 PM, Nevin Liber <nevin_at_[hidden]> wrote:

> On 20 December 2011 17:53, Jayden Shui <jayden.shui_at_[hidden]> wrote:
>
> > Do I need std::set/map< shared_ptr<scoped_ptr<B>>, your_compare > to do
> it,
> > since it is the B* shared? Thanks a lot.
>
> Yes. In addition, you'll have to erase then insert whenever you
> change the object which scoped_ptr<B> holds, unless you have some
> other way of guaranteeing that B::Name() won't change when the object
> changes. Multiindex might be easier to use in this respect.
>
>
Thanks a lot! Elements in container are on heap. I just feel the

         somehow_container_ptr<shared_ptr<scoped_ptr<B>>>

so unfriendly to developers.



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