Boost logo

Boost :

Subject: Re: [boost] [Root Pointer] New Documentation
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-04-10 23:32:31


On 04/10/2016 11:02 PM, Vladimir Batov wrote:
> Phil,
>
> Unfortunately you test below confirmed my suspicion. Now could you
> kindly explain how your library is better than:
>
> template<typename T>
> struct manager
> {
> T* create(args) { all_.emplace_back(args); return &all_.back(); }
> void remove(T*) { ... }
>
> std::list<T> all_;
> };
>
> T* serves as your node_ptr -- all pointers are valid as long as its
> manager instance is around. What am I missing?

I am not sure if I understand the analogy correctly but I can see that
remove() will have to do a linear search in the list, slowing down the
performance in general.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk