Boost logo

Boost :

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


>
>
> 1) push_back() & unchecked_push_back()
> or
> 2) push_back() & checked_push_back().

If it was between 1 and 2, I would still find option (1) to be the best,
because it keeps things closer to std::vector. However, one alternative
would be to choose another name for the unchecked version. Its not like
vec.at() or vec[N] really say much about how they check things. Even so, the
lack of naming expressiveness in one function hardly justifies keeping
others cryptic. Nonetheless, perhaps there are other options that work:

3) push_back() & put_back()
4) push_back() & set_back()

I like option 3 much better than 4, since set is already so heavily used,
and better than 2 for the reasons above. I'm undecided between 1 and 3.

Cheers!
Andrew Hundt


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