
On Mar 1, 2012, at 12:13 PM, Frank Birbacher wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi!
Is there in Boost a container that is statically "max sized" and contains its own storage like a std::array, but manages a size and can construct and destruct elements. I guess it would look something like:
template
struct self_contained_vector { size_t max_size() const { return N; } size_t size() const { return size_; } private: size_t size_; aligned_storage<T> data_[N]; //...implement random access container... };
I've written one of these; I'm thinking about adding it to Boost.Array. I have to write tests and docs, though. -- Marshall Marshall Clow Idio Software mailto:mclow.lists@gmail.com A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki