Boost logo

Boost :

Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2011-10-14 20:34:46

-----Original Message-----
From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Andrew Hundt
Sent: Friday, October 14, 2011 8:14 AM
To: boost_at_[hidden]
Subject: Re: [boost] Interest in StaticVector - fixed capacity vector

>> 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.

>I definitely see a lot of clarity in implementing it this way. I just
>wish there was a nicer name than unchecked_push_back.

If I were writing the code I would name it push_back_blindly. I have several _blindly functions in polygon. The generally mean that the caller assumes responsibility for maintaining the class invariant and that the class should skip the usual checks for performance reasons. Typically these are intended for use within the class itself, but I make them public instead of private because I trust that I can use them properly from within or without. I think unchecked_push_back is perfectly fine too.


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