Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-10-14 10:48:29
2011/10/14 Ion Gaztañaga <igaztanaga_at_[hidden]>:
but we currently have no
> push_back preconditions for push_back, insert, etc. and this can be a great
> source of mistakes.
I agree. And unlike at() vs. operator, in this case we are moving
enforcement of the class invariants from the class itself the caller,
just to save an "if" check.
I really don't want to see a policy controlling this; rather, have
unchecked_push_back and unchecked_insert for those who need every
ounce of performance at the expense of safety.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk