Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-03-17 10:06:35


Timmo Stange wrote:
> Tobias Schwinger wrote:
>
>>> What's the difference between that and the standard (non-intrusive)
>>> containers?
>>>
>> The same as intrusive containers: Allocation in one shot and having both
>> the actual data and the accounting information in one block of memory.
>>
>> I might be missing something. Am I?

Yes.

> I am not sure. Perhaps I'm the one missing something in your idea, but
> what you suggested is how list nodes may already look like in a
> standard library implementation. They use "single-shot allocation"

You're right - I should've taken a look into the source before making
noise :).

> when T is copy-constructible. If it is not, one needs to use list<T*>
> and allocate Ts separately. I do not see how that can be avoided when
> the node type is hidden in the implementation.

Cool, now I understand the purpose of this submission. I vote for a less
confusing intro.

Thanks,
Tobias


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