Boost logo

Boost :

Subject: Re: [boost] [container] static_vector: fixed capacity vector update
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2013-01-31 06:47:17


2013/1/17 Andrew Hundt <athundt_at_[hidden]>

> *static_vector is a hybrid of boost::container::vector and boost::array
> with fixed capacity.
>
> Adam Wulkiewicz and I have updated static_vector with improvements from the
> list discussion and reorganized it for possible inclusion into
> boost.container.
>
> Overview:
> static_vector is a sequence container with contiguous storage that can
> change in size like boost::container::vector. It also includes static
> allocation, low overhead, and fixed capacity similar to boost::array.
>

Hello,
Thanks for working on static_vector, I'm already using it.

Everything works, with a little fix I needed. Here's the problem
(disclamer: tested with a more complicated example, not the one below):

static_vector<int,3> v;
v.emplace_back(); // compile time error

My fix is adding an overload for static_vector_detail::construct, patch
attached.

Cheers,
Kris




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