|
Boost : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-03-16 19:48:04
Hi,
Tom Brinkman wrote:
<comments about the introduction>
I felt exactly the same after reading the introduction.
Then I figured it might be about "one-shot allocation" and reading the
rest of this thread it seems that assumption has been correct.
Anyway, I still don't understand why we can't have intrusive containers
without intrusive syntax. E.g:
struct slist_node // <-- part of container implementation
{
T element; // note: held by value
slist_node * next;
};
Then there's only one allocation per 'slist_node'.
With compiler options that enable structure padding (up to 2^n, for
alignment) it will be bad, but usually it can be disabled for individual
structures (in this case one would have to disable alignment/padding for
whatever T is).
So, why does the user have to add custom data members?
Regards,
Tobias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk