|
Boost : |
Subject: [boost] [utility] auto_buffer v2
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-03-04 18:54:45
Dear All,
Hereby an updated class. Thanks to all who contributed with comments to
the first try.
I have made the following changes:
1. push_back() overloads are now growing
2. added swap() (boy, was this nasty to implement). I assume the
allocator can be wapped without throwing. How do other people
copy with this problem?
3. added copy-constructor + copy-assignment
4. made the min capacity equal to N, the number of elements in the stack
buffer
5. the size of the internal buffer is now controlled via two policies:
template< unsigned N >
struct store_n_objects;
template< unsigned N >
struct store_n_bytes;
the default is store_n_objects<256>. The reason is that we don't want
the capacity to change just because we compile on a different platform.
6. added comparison operators
Comments most welcome!
best regards
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk