Boost logo

Boost :

Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Andrew Hundt (athundt_at_[hidden])
Date: 2011-10-14 12:04:19

>  * unchecked_push_back which does what it says; AND
>  * checked_push_back which does what it says; AND
>  * push_back which calls one or the other based on a policy
> That leaves just one thing to quibble about - the default value of the
> policy - but even that choice becomes less important, because those
> who feel strongly about the default behaviour of push_back being
> one or the other can just use the explicitly-named version instead.

I love the sound of design-by-committee in the morning :-)

More seriously, I do think that makes sense since it allows the user
to select the appropriate function for their design, but use the
alternate one when necessary.

If this is what is finally settled on, I would prefer to default to a
checked policy because then it will catch and prevent mistakes by
default. If you have an exceptional reason for the performance, you
can switch to the alternate function/policy.

Andrew Hundt

Boost list run by bdawes at, gregod at, cpdaniel at, john at