Boost logo

Boost :

Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2011-10-16 07:50:31


Peter Dimov wrote:
> Adam Wulkiewicz wrote:
>
>> Why stick to this container? Why close this funcionality inside? You
>> are all of the time debating about one case which should be handled
>> differently.
>
> I don't think that "potential number of elements not bounded by a
> compile-time constant" can be reasonably classified as "one use case",
> although you could legitimately argue that it should be handled
> differently. That is, that people are holding it wrong. I kind of sense
> that you're a bit frustrated at my holding it wrong. I also predict that
> many others will hold it wrong. This could be their own fault, or it
> could be a design issue.

One use case is "inserting run-time number of elements to the container
which should store compile-time number of elements finished by throwing
an exception". A workaround of a problem which is "exiting from some
routine's internals at some point of execution in possibly unknown
place". This will work with some routines and don't with others which
treat exceptions differently. And you're saying that only one specific
conainer is intended for this task because other won't throw an
exception in this case.

Regards,
Adam


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