From: Olaf Krzikalla (krzikalla_at_[hidden])
Date: 2005-05-01 06:07:05
Thorsten Ottosen wrote:
> so why not use "ordinary" views, eg. containers of pointers?
> it's not difficult to lay out std::vector<Foo*> s.t. no memory allocation
> occurs (except once).
It strongly depends on your application. E.g. inserting and removing
elements in the middle of a sequence rather forbids the using of
std::vector due to performance reasons. And in an answer to Frank I
discussed the using of std::list together with pool allocators.
I don't argue, that intrusive containers are the swiss-army knife they
used to be in the C world. In fact, the application area is very limited
in the C++ world, since you can choose from a wide range of approaches
regarding sequences. However, IMHO intrusive containers certainly belong
to that range and sometimes they even aren't replaceable without a loss